<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/gui/kernel/qwidget.cpp -->
<head>
  <title>Qt 4.3: QWidget Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QWidget Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
<p>The QWidget class is the base class of all user interface objects. <a href="#details">More...</a></p>
<pre> #include &lt;QWidget&gt;</pre><p>Inherits <a href="qobject.html">QObject</a> and <a href="qpaintdevice.html">QPaintDevice</a>.</p>
<p>Inherited by <a href="q3combobox.html">Q3ComboBox</a>, <a href="q3databrowser.html">Q3DataBrowser</a>, <a href="q3dataview.html">Q3DataView</a>, <a href="q3datetimeedit.html">Q3DateTimeEdit</a>, <a href="q3datetimeeditbase.html">Q3DateTimeEditBase</a>, <a href="q3dockarea.html">Q3DockArea</a>, <a href="q3header.html">Q3Header</a>, <a href="q3mainwindow.html">Q3MainWindow</a>, <a href="qabstractbutton.html">QAbstractButton</a>, <a href="qabstractslider.html">QAbstractSlider</a>, <a href="qabstractspinbox.html">QAbstractSpinBox</a>, <a href="qaxwidget.html">QAxWidget</a>, <a href="qcalendarwidget.html">QCalendarWidget</a>, <a href="qcombobox.html">QComboBox</a>, <a href="qdesigneractioneditorinterface.html">QDesignerActionEditorInterface</a>, <a href="qdesignerformwindowinterface.html">QDesignerFormWindowInterface</a>, <a href="qdesignerobjectinspectorinterface.html">QDesignerObjectInspectorInterface</a>, <a href="qdesignerpropertyeditorinterface.html">QDesignerPropertyEditorInterface</a>, <a href="qdesignerwidgetboxinterface.html">QDesignerWidgetBoxInterface</a>, <a href="qdesktopwidget.html">QDesktopWidget</a>, <a href="qdialog.html">QDialog</a>, <a href="qdialogbuttonbox.html">QDialogButtonBox</a>, <a href="qdockwidget.html">QDockWidget</a>, <a href="qfocusframe.html">QFocusFrame</a>, <a href="qframe.html">QFrame</a>, <a href="qglwidget.html">QGLWidget</a>, <a href="qgroupbox.html">QGroupBox</a>, <a href="qlineedit.html">QLineEdit</a>, <a href="qmainwindow.html">QMainWindow</a>, <a href="qmdisubwindow.html">QMdiSubWindow</a>, <a href="qmenu.html">QMenu</a>, <a href="qmenubar.html">QMenuBar</a>, <a href="qprogressbar.html">QProgressBar</a>, <a href="qrubberband.html">QRubberBand</a>, <a href="qsizegrip.html">QSizeGrip</a>, <a href="qsplashscreen.html">QSplashScreen</a>, <a href="qsplitterhandle.html">QSplitterHandle</a>, <a href="qstatusbar.html">QStatusBar</a>, <a href="qsvgwidget.html">QSvgWidget</a>, <a href="qtabbar.html">QTabBar</a>, <a href="qtabwidget.html">QTabWidget</a>, <a href="qtoolbar.html">QToolBar</a>, <a href="qwizardpage.html">QWizardPage</a>, <a href="qworkspace.html">QWorkspace</a>, <a href="qwsembedwidget.html">QWSEmbedWidget</a>, <a href="qx11embedcontainer.html">QX11EmbedContainer</a>, and <a href="qx11embedwidget.html">QX11EmbedWidget</a>.</p>
<ul>
<li><a href="qwidget-members.html">List of all members, including inherited members</a></li>
<li><a href="qwidget-obsolete.html">Obsolete members</a></li>
<li><a href="qwidget-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="public-types"></a>
<h3>Public Types</h3>
<ul>
<li><div class="fn"/>enum <b><a href="qwidget.html#RenderFlag-enum">RenderFlag</a></b> { DrawWindowBackground, DrawChildren, IgnoreMask }</li>
<li><div class="fn"/>flags <b><a href="qwidget.html#RenderFlag-enum">RenderFlags</a></b></li>
</ul>
<a name="properties"></a>
<h3>Properties</h3>
<p><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="45%" valign="top"><ul>
<li><div class="fn"/><b><a href="qwidget.html#acceptDrops-prop">acceptDrops</a></b> : bool</li>
<li><div class="fn"/><b><a href="qwidget.html#accessibleDescription-prop">accessibleDescription</a></b> : QString</li>
<li><div class="fn"/><b><a href="qwidget.html#accessibleName-prop">accessibleName</a></b> : QString</li>
<li><div class="fn"/><b><a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a></b> : bool</li>
<li><div class="fn"/><b><a href="qwidget.html#baseSize-prop">baseSize</a></b> : QSize</li>
<li><div class="fn"/><b><a href="qwidget.html#childrenRect-prop">childrenRect</a></b> : const QRect</li>
<li><div class="fn"/><b><a href="qwidget.html#childrenRegion-prop">childrenRegion</a></b> : const QRegion</li>
<li><div class="fn"/><b><a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a></b> : Qt::ContextMenuPolicy</li>
<li><div class="fn"/><b><a href="qwidget.html#cursor-prop">cursor</a></b> : QCursor</li>
<li><div class="fn"/><b><a href="qwidget.html#enabled-prop">enabled</a></b> : bool</li>
<li><div class="fn"/><b><a href="qwidget.html#focus-prop">focus</a></b> : const bool</li>
<li><div class="fn"/><b><a href="qwidget.html#focusPolicy-prop">focusPolicy</a></b> : Qt::FocusPolicy</li>
<li><div class="fn"/><b><a href="qwidget.html#font-prop">font</a></b> : QFont</li>
<li><div class="fn"/><b><a href="qwidget.html#frameGeometry-prop">frameGeometry</a></b> : const QRect</li>
<li><div class="fn"/><b><a href="qwidget.html#frameSize-prop">frameSize</a></b> : const QSize</li>
<li><div class="fn"/><b><a href="qwidget.html#fullScreen-prop">fullScreen</a></b> : const bool</li>
<li><div class="fn"/><b><a href="qwidget.html#geometry-prop">geometry</a></b> : QRect</li>
<li><div class="fn"/><b><a href="qwidget.html#height-prop">height</a></b> : const int</li>
<li><div class="fn"/><b><a href="qwidget.html#isActiveWindow-prop">isActiveWindow</a></b> : const bool</li>
<li><div class="fn"/><b><a href="qwidget.html#layoutDirection-prop">layoutDirection</a></b> : Qt::LayoutDirection</li>
<li><div class="fn"/><b><a href="qwidget.html#locale-prop">locale</a></b> : QLocale</li>
<li><div class="fn"/><b><a href="qwidget.html#maximized-prop">maximized</a></b> : const bool</li>
<li><div class="fn"/><b><a href="qwidget.html#maximumHeight-prop">maximumHeight</a></b> : int</li>
<li><div class="fn"/><b><a href="qwidget.html#maximumSize-prop">maximumSize</a></b> : QSize</li>
<li><div class="fn"/><b><a href="qwidget.html#maximumWidth-prop">maximumWidth</a></b> : int</li>
<li><div class="fn"/><b><a href="qwidget.html#minimized-prop">minimized</a></b> : const bool</li>
<li><div class="fn"/><b><a href="qwidget.html#minimumHeight-prop">minimumHeight</a></b> : int</li>
<li><div class="fn"/><b><a href="qwidget.html#minimumSize-prop">minimumSize</a></b> : QSize</li>
</ul></td><td valign="top"><ul>
<li><div class="fn"/><b><a href="qwidget.html#minimumSizeHint-prop">minimumSizeHint</a></b> : const QSize</li>
<li><div class="fn"/><b><a href="qwidget.html#minimumWidth-prop">minimumWidth</a></b> : int</li>
<li><div class="fn"/><b><a href="qwidget.html#modal-prop">modal</a></b> : const bool</li>
<li><div class="fn"/><b><a href="qwidget.html#mouseTracking-prop">mouseTracking</a></b> : bool</li>
<li><div class="fn"/><b><a href="qwidget.html#normalGeometry-prop">normalGeometry</a></b> : const QRect</li>
<li><div class="fn"/><b><a href="qwidget.html#palette-prop">palette</a></b> : QPalette</li>
<li><div class="fn"/><b><a href="qwidget.html#pos-prop">pos</a></b> : QPoint</li>
<li><div class="fn"/><b><a href="qwidget.html#rect-prop">rect</a></b> : const QRect</li>
<li><div class="fn"/><b><a href="qwidget.html#size-prop">size</a></b> : QSize</li>
<li><div class="fn"/><b><a href="qwidget.html#sizeHint-prop">sizeHint</a></b> : const QSize</li>
<li><div class="fn"/><b><a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a></b> : QSize</li>
<li><div class="fn"/><b><a href="qwidget.html#sizePolicy-prop">sizePolicy</a></b> : QSizePolicy</li>
<li><div class="fn"/><b><a href="qwidget.html#statusTip-prop">statusTip</a></b> : QString</li>
<li><div class="fn"/><b><a href="qwidget.html#styleSheet-prop">styleSheet</a></b> : QString</li>
<li><div class="fn"/><b><a href="qwidget.html#toolTip-prop">toolTip</a></b> : QString</li>
<li><div class="fn"/><b><a href="qwidget.html#updatesEnabled-prop">updatesEnabled</a></b> : bool</li>
<li><div class="fn"/><b><a href="qwidget.html#visible-prop">visible</a></b> : bool</li>
<li><div class="fn"/><b><a href="qwidget.html#whatsThis-prop">whatsThis</a></b> : QString</li>
<li><div class="fn"/><b><a href="qwidget.html#width-prop">width</a></b> : const int</li>
<li><div class="fn"/><b><a href="qwidget.html#windowFlags-prop">windowFlags</a></b> : Qt::WindowFlags</li>
<li><div class="fn"/><b><a href="qwidget.html#windowIcon-prop">windowIcon</a></b> : QIcon</li>
<li><div class="fn"/><b><a href="qwidget.html#windowIconText-prop">windowIconText</a></b> : QString</li>
<li><div class="fn"/><b><a href="qwidget.html#windowModality-prop">windowModality</a></b> : Qt::WindowModality</li>
<li><div class="fn"/><b><a href="qwidget.html#windowModified-prop">windowModified</a></b> : bool</li>
<li><div class="fn"/><b><a href="qwidget.html#windowOpacity-prop">windowOpacity</a></b> : double</li>
<li><div class="fn"/><b><a href="qwidget.html#windowTitle-prop">windowTitle</a></b> : QString</li>
<li><div class="fn"/><b><a href="qwidget.html#x-prop">x</a></b> : const int</li>
<li><div class="fn"/><b><a href="qwidget.html#y-prop">y</a></b> : const int</li>
</ul>
</td></tr>
</table></p>
<ul>
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qwidget.html#QWidget">QWidget</a></b> ( QWidget * <i>parent</i> = 0, Qt::WindowFlags <i>f</i> = 0 )</li>
<li><div class="fn"/><b><a href="qwidget.html#dtor.QWidget">~QWidget</a></b> ()</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#acceptDrops-prop">acceptDrops</a></b> () const</li>
<li><div class="fn"/>QString <b><a href="qwidget.html#accessibleDescription-prop">accessibleDescription</a></b> () const</li>
<li><div class="fn"/>QString <b><a href="qwidget.html#accessibleName-prop">accessibleName</a></b> () const</li>
<li><div class="fn"/>QList&lt;QAction *&gt; <b><a href="qwidget.html#actions">actions</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qwidget.html#activateWindow">activateWindow</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#addAction">addAction</a></b> ( QAction * <i>action</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#addActions">addActions</a></b> ( QList&lt;QAction *&gt; <i>actions</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#adjustSize">adjustSize</a></b> ()</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a></b> () const</li>
<li><div class="fn"/>QPalette::ColorRole <b><a href="qwidget.html#backgroundRole">backgroundRole</a></b> () const</li>
<li><div class="fn"/>QSize <b><a href="qwidget.html#baseSize-prop">baseSize</a></b> () const</li>
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#childAt">childAt</a></b> ( int <i>x</i>, int <i>y</i> ) const</li>
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#childAt-4">childAt</a></b> ( const QPoint &amp; <i>p</i> ) const</li>
<li><div class="fn"/>QRect <b><a href="qwidget.html#childrenRect-prop">childrenRect</a></b> () const</li>
<li><div class="fn"/>QRegion <b><a href="qwidget.html#childrenRegion-prop">childrenRegion</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qwidget.html#clearFocus">clearFocus</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#clearMask">clearMask</a></b> ()</li>
<li><div class="fn"/>QRect <b><a href="qwidget.html#contentsRect">contentsRect</a></b> () const</li>
<li><div class="fn"/>Qt::ContextMenuPolicy <b><a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a></b> () const</li>
<li><div class="fn"/>QCursor <b><a href="qwidget.html#cursor-prop">cursor</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qwidget.html#ensurePolished">ensurePolished</a></b> () const</li>
<li><div class="fn"/>Qt::FocusPolicy <b><a href="qwidget.html#focusPolicy-prop">focusPolicy</a></b> () const</li>
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#focusProxy">focusProxy</a></b> () const</li>
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#focusWidget">focusWidget</a></b> () const</li>
<li><div class="fn"/>const QFont &amp; <b><a href="qwidget.html#font-prop">font</a></b> () const</li>
<li><div class="fn"/>QFontInfo <b><a href="qwidget.html#fontInfo">fontInfo</a></b> () const</li>
<li><div class="fn"/>QFontMetrics <b><a href="qwidget.html#fontMetrics">fontMetrics</a></b> () const</li>
<li><div class="fn"/>QPalette::ColorRole <b><a href="qwidget.html#foregroundRole">foregroundRole</a></b> () const</li>
<li><div class="fn"/>QRect <b><a href="qwidget.html#frameGeometry-prop">frameGeometry</a></b> () const</li>
<li><div class="fn"/>QSize <b><a href="qwidget.html#frameSize-prop">frameSize</a></b> () const</li>
<li><div class="fn"/>const QRect &amp; <b><a href="qwidget.html#geometry-prop">geometry</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qwidget.html#getContentsMargins">getContentsMargins</a></b> ( int * <i>left</i>, int * <i>top</i>, int * <i>right</i>, int * <i>bottom</i> ) const</li>
<li><div class="fn"/>virtual HDC <b><a href="qwidget.html#getDC">getDC</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qwidget.html#grabKeyboard">grabKeyboard</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#grabMouse">grabMouse</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#grabMouse-2">grabMouse</a></b> ( const QCursor &amp; <i>cursor</i> )</li>
<li><div class="fn"/>int <b><a href="qwidget.html#grabShortcut">grabShortcut</a></b> ( const QKeySequence &amp; <i>key</i>, Qt::ShortcutContext <i>context</i> = Qt::WindowShortcut )</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#hasEditFocus">hasEditFocus</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#focus-prop">hasFocus</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#mouseTracking-prop">hasMouseTracking</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qwidget.html#height-prop">height</a></b> () const</li>
<li><div class="fn"/>virtual int <b><a href="qwidget.html#heightForWidth">heightForWidth</a></b> ( int <i>w</i> ) const</li>
<li><div class="fn"/>QInputContext * <b><a href="qwidget.html#inputContext">inputContext</a></b> ()</li>
<li><div class="fn"/>virtual QVariant <b><a href="qwidget.html#inputMethodQuery">inputMethodQuery</a></b> ( Qt::InputMethodQuery <i>query</i> ) const</li>
<li><div class="fn"/>void <b><a href="qwidget.html#insertAction">insertAction</a></b> ( QAction * <i>before</i>, QAction * <i>action</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#insertActions">insertActions</a></b> ( QAction * <i>before</i>, QList&lt;QAction *&gt; <i>actions</i> )</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#isActiveWindow-prop">isActiveWindow</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#isAncestorOf">isAncestorOf</a></b> ( const QWidget * <i>child</i> ) const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#enabled-prop">isEnabled</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#isEnabledTo">isEnabledTo</a></b> ( QWidget * <i>ancestor</i> ) const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#fullScreen-prop">isFullScreen</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#isHidden">isHidden</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#maximized-prop">isMaximized</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#minimized-prop">isMinimized</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#modal-prop">isModal</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#visible-prop">isVisible</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#isVisibleTo">isVisibleTo</a></b> ( QWidget * <i>ancestor</i> ) const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#isWindow">isWindow</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#windowModified-prop">isWindowModified</a></b> () const</li>
<li><div class="fn"/>QLayout * <b><a href="qwidget.html#layout">layout</a></b> () const</li>
<li><div class="fn"/>Qt::LayoutDirection <b><a href="qwidget.html#layoutDirection-prop">layoutDirection</a></b> () const</li>
<li><div class="fn"/>QLocale <b><a href="qwidget.html#locale-prop">locale</a></b> () const</li>
<li><div class="fn"/>Qt::HANDLE <b><a href="qwidget.html#macCGHandle">macCGHandle</a></b> () const</li>
<li><div class="fn"/>Qt::HANDLE <b><a href="qwidget.html#macQDHandle">macQDHandle</a></b> () const</li>
<li><div class="fn"/>QPoint <b><a href="qwidget.html#mapFrom">mapFrom</a></b> ( QWidget * <i>parent</i>, const QPoint &amp; <i>pos</i> ) const</li>
<li><div class="fn"/>QPoint <b><a href="qwidget.html#mapFromGlobal">mapFromGlobal</a></b> ( const QPoint &amp; <i>pos</i> ) const</li>
<li><div class="fn"/>QPoint <b><a href="qwidget.html#mapFromParent">mapFromParent</a></b> ( const QPoint &amp; <i>pos</i> ) const</li>
<li><div class="fn"/>QPoint <b><a href="qwidget.html#mapTo">mapTo</a></b> ( QWidget * <i>parent</i>, const QPoint &amp; <i>pos</i> ) const</li>
<li><div class="fn"/>QPoint <b><a href="qwidget.html#mapToGlobal">mapToGlobal</a></b> ( const QPoint &amp; <i>pos</i> ) const</li>
<li><div class="fn"/>QPoint <b><a href="qwidget.html#mapToParent">mapToParent</a></b> ( const QPoint &amp; <i>pos</i> ) const</li>
<li><div class="fn"/>QRegion <b><a href="qwidget.html#mask">mask</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qwidget.html#maximumHeight-prop">maximumHeight</a></b> () const</li>
<li><div class="fn"/>QSize <b><a href="qwidget.html#maximumSize-prop">maximumSize</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qwidget.html#maximumWidth-prop">maximumWidth</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qwidget.html#minimumHeight-prop">minimumHeight</a></b> () const</li>
<li><div class="fn"/>QSize <b><a href="qwidget.html#minimumSize-prop">minimumSize</a></b> () const</li>
<li><div class="fn"/>virtual QSize <b><a href="qwidget.html#minimumSizeHint-prop">minimumSizeHint</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qwidget.html#minimumWidth-prop">minimumWidth</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qwidget.html#pos-prop">move</a></b> ( const QPoint &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#pos-prop">move</a></b> ( int <i>x</i>, int <i>y</i> )</li>
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#nextInFocusChain">nextInFocusChain</a></b> () const</li>
<li><div class="fn"/>QRect <b><a href="qwidget.html#normalGeometry-prop">normalGeometry</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qwidget.html#overrideWindowFlags">overrideWindowFlags</a></b> ( Qt::WindowFlags <i>flags</i> )</li>
<li><div class="fn"/>virtual QPaintEngine * <b><a href="qwidget.html#paintEngine">paintEngine</a></b> () const</li>
<li><div class="fn"/>const QPalette &amp; <b><a href="qwidget.html#palette-prop">palette</a></b> () const</li>
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#parentWidget">parentWidget</a></b> () const</li>
<li><div class="fn"/>QPoint <b><a href="qwidget.html#pos-prop">pos</a></b> () const</li>
<li><div class="fn"/>QRect <b><a href="qwidget.html#rect-prop">rect</a></b> () const</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#releaseDC">releaseDC</a></b> ( HDC <i>hdc</i> ) const</li>
<li><div class="fn"/>void <b><a href="qwidget.html#releaseKeyboard">releaseKeyboard</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#releaseMouse">releaseMouse</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#releaseShortcut">releaseShortcut</a></b> ( int <i>id</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#removeAction">removeAction</a></b> ( QAction * <i>action</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#render">render</a></b> ( QPaintDevice * <i>target</i>, const QPoint &amp; <i>targetOffset</i> = QPoint(), const QRegion &amp; <i>sourceRegion</i> = QRegion(), RenderFlags <i>renderFlags</i> = RenderFlags( DrawWindowBackground | DrawChildren ) )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#repaint-6">repaint</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#repaint-7">repaint</a></b> ( const QRect &amp; <i>r</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#repaint-8">repaint</a></b> ( const QRegion &amp; <i>rgn</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#size-prop">resize</a></b> ( const QSize &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#size-prop">resize</a></b> ( int <i>w</i>, int <i>h</i> )</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#restoreGeometry">restoreGeometry</a></b> ( const QByteArray &amp; <i>geometry</i> )</li>
<li><div class="fn"/>QByteArray <b><a href="qwidget.html#saveGeometry">saveGeometry</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qwidget.html#scroll">scroll</a></b> ( int <i>dx</i>, int <i>dy</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#scroll-2">scroll</a></b> ( int <i>dx</i>, int <i>dy</i>, const QRect &amp; <i>r</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#acceptDrops-prop">setAcceptDrops</a></b> ( bool <i>on</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#accessibleDescription-prop">setAccessibleDescription</a></b> ( const QString &amp; <i>description</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#accessibleName-prop">setAccessibleName</a></b> ( const QString &amp; <i>name</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setAttribute">setAttribute</a></b> ( Qt::WidgetAttribute <i>attribute</i>, bool <i>on</i> = true )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#autoFillBackground-prop">setAutoFillBackground</a></b> ( bool <i>enabled</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setBackgroundRole">setBackgroundRole</a></b> ( QPalette::ColorRole <i>role</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#baseSize-prop">setBaseSize</a></b> ( const QSize &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#baseSize-prop">setBaseSize</a></b> ( int <i>basew</i>, int <i>baseh</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setContentsMargins">setContentsMargins</a></b> ( int <i>left</i>, int <i>top</i>, int <i>right</i>, int <i>bottom</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#contextMenuPolicy-prop">setContextMenuPolicy</a></b> ( Qt::ContextMenuPolicy <i>policy</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#cursor-prop">setCursor</a></b> ( const QCursor &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setEditFocus">setEditFocus</a></b> ( bool <i>enable</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setFixedHeight">setFixedHeight</a></b> ( int <i>h</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setFixedSize">setFixedSize</a></b> ( const QSize &amp; <i>s</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setFixedSize-2">setFixedSize</a></b> ( int <i>w</i>, int <i>h</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setFixedWidth">setFixedWidth</a></b> ( int <i>w</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setFocus">setFocus</a></b> ( Qt::FocusReason <i>reason</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a></b> ( Qt::FocusPolicy <i>policy</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setFocusProxy">setFocusProxy</a></b> ( QWidget * <i>w</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#font-prop">setFont</a></b> ( const QFont &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setForegroundRole">setForegroundRole</a></b> ( QPalette::ColorRole <i>role</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#geometry-prop">setGeometry</a></b> ( const QRect &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#geometry-prop">setGeometry</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setInputContext">setInputContext</a></b> ( QInputContext * <i>context</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setLayout">setLayout</a></b> ( QLayout * <i>layout</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#layoutDirection-prop">setLayoutDirection</a></b> ( Qt::LayoutDirection <i>direction</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#locale-prop">setLocale</a></b> ( const QLocale &amp; <i>locale</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setMask">setMask</a></b> ( const QBitmap &amp; <i>bitmap</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setMask-2">setMask</a></b> ( const QRegion &amp; <i>region</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#maximumHeight-prop">setMaximumHeight</a></b> ( int <i>maxh</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#maximumSize-prop">setMaximumSize</a></b> ( const QSize &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#maximumSize-prop">setMaximumSize</a></b> ( int <i>maxw</i>, int <i>maxh</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#maximumWidth-prop">setMaximumWidth</a></b> ( int <i>maxw</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#minimumHeight-prop">setMinimumHeight</a></b> ( int <i>minh</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#minimumSize-prop">setMinimumSize</a></b> ( const QSize &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#minimumSize-prop">setMinimumSize</a></b> ( int <i>minw</i>, int <i>minh</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#minimumWidth-prop">setMinimumWidth</a></b> ( int <i>minw</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#mouseTracking-prop">setMouseTracking</a></b> ( bool <i>enable</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#palette-prop">setPalette</a></b> ( const QPalette &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setParent">setParent</a></b> ( QWidget * <i>parent</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setParent-2">setParent</a></b> ( QWidget * <i>parent</i>, Qt::WindowFlags <i>f</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setShortcutAutoRepeat">setShortcutAutoRepeat</a></b> ( int <i>id</i>, bool <i>enable</i> = true )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setShortcutEnabled">setShortcutEnabled</a></b> ( int <i>id</i>, bool <i>enable</i> = true )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#sizeIncrement-prop">setSizeIncrement</a></b> ( const QSize &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#sizeIncrement-prop">setSizeIncrement</a></b> ( int <i>w</i>, int <i>h</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#sizePolicy-prop">setSizePolicy</a></b> ( QSizePolicy )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#sizePolicy-prop">setSizePolicy</a></b> ( QSizePolicy::Policy <i>horizontal</i>, QSizePolicy::Policy <i>vertical</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#statusTip-prop">setStatusTip</a></b> ( const QString &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setStyle">setStyle</a></b> ( QStyle * <i>style</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#toolTip-prop">setToolTip</a></b> ( const QString &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#updatesEnabled-prop">setUpdatesEnabled</a></b> ( bool <i>enable</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#whatsThis-prop">setWhatsThis</a></b> ( const QString &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#windowFlags-prop">setWindowFlags</a></b> ( Qt::WindowFlags <i>type</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#windowIcon-prop">setWindowIcon</a></b> ( const QIcon &amp; <i>icon</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#windowIconText-prop">setWindowIconText</a></b> ( const QString &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#windowModality-prop">setWindowModality</a></b> ( Qt::WindowModality <i>windowModality</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#windowOpacity-prop">setWindowOpacity</a></b> ( qreal <i>level</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setWindowRole">setWindowRole</a></b> ( const QString &amp; <i>role</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setWindowState">setWindowState</a></b> ( Qt::WindowStates <i>windowState</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setWindowSurface">setWindowSurface</a></b> ( QWindowSurface * <i>surface</i> )&nbsp;&nbsp;<tt> (preliminary)</tt></li>
<li><div class="fn"/>QSize <b><a href="qwidget.html#size-prop">size</a></b> () const</li>
<li><div class="fn"/>virtual QSize <b><a href="qwidget.html#sizeHint-prop">sizeHint</a></b> () const</li>
<li><div class="fn"/>QSize <b><a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a></b> () const</li>
<li><div class="fn"/>QSizePolicy <b><a href="qwidget.html#sizePolicy-prop">sizePolicy</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qwidget.html#stackUnder">stackUnder</a></b> ( QWidget * <i>w</i> )</li>
<li><div class="fn"/>QString <b><a href="qwidget.html#statusTip-prop">statusTip</a></b> () const</li>
<li><div class="fn"/>QStyle * <b><a href="qwidget.html#style">style</a></b> () const</li>
<li><div class="fn"/>QString <b><a href="qwidget.html#styleSheet-prop">styleSheet</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#testAttribute">testAttribute</a></b> ( Qt::WidgetAttribute <i>attribute</i> ) const</li>
<li><div class="fn"/>QString <b><a href="qwidget.html#toolTip-prop">toolTip</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#underMouse">underMouse</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qwidget.html#cursor-prop">unsetCursor</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#layoutDirection-prop">unsetLayoutDirection</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#locale-prop">unsetLocale</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#update-2">update</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#update-3">update</a></b> ( const QRect &amp; <i>r</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#update-4">update</a></b> ( const QRegion &amp; <i>rgn</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#updateGeometry">updateGeometry</a></b> ()</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#updatesEnabled-prop">updatesEnabled</a></b> () const</li>
<li><div class="fn"/>QRegion <b><a href="qwidget.html#visibleRegion">visibleRegion</a></b> () const</li>
<li><div class="fn"/>QString <b><a href="qwidget.html#whatsThis-prop">whatsThis</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qwidget.html#width-prop">width</a></b> () const</li>
<li><div class="fn"/>WId <b><a href="qwidget.html#winId">winId</a></b> () const</li>
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#window">window</a></b> () const</li>
<li><div class="fn"/>Qt::WindowFlags <b><a href="qwidget.html#windowFlags-prop">windowFlags</a></b> () const</li>
<li><div class="fn"/>QIcon <b><a href="qwidget.html#windowIcon-prop">windowIcon</a></b> () const</li>
<li><div class="fn"/>QString <b><a href="qwidget.html#windowIconText-prop">windowIconText</a></b> () const</li>
<li><div class="fn"/>Qt::WindowModality <b><a href="qwidget.html#windowModality-prop">windowModality</a></b> () const</li>
<li><div class="fn"/>qreal <b><a href="qwidget.html#windowOpacity-prop">windowOpacity</a></b> () const</li>
<li><div class="fn"/>QString <b><a href="qwidget.html#windowRole">windowRole</a></b> () const</li>
<li><div class="fn"/>Qt::WindowStates <b><a href="qwidget.html#windowState">windowState</a></b> () const</li>
<li><div class="fn"/>QWindowSurface * <b><a href="qwidget.html#windowSurface">windowSurface</a></b> () const&nbsp;&nbsp;<tt> (preliminary)</tt></li>
<li><div class="fn"/>QString <b><a href="qwidget.html#windowTitle-prop">windowTitle</a></b> () const</li>
<li><div class="fn"/>Qt::WindowType <b><a href="qwidget.html#windowType">windowType</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qwidget.html#x-prop">x</a></b> () const</li>
<li><div class="fn"/>const QX11Info &amp; <b><a href="qwidget.html#x11Info">x11Info</a></b> () const</li>
<li><div class="fn"/>Qt::HANDLE <b><a href="qwidget.html#x11PictureHandle">x11PictureHandle</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qwidget.html#y-prop">y</a></b> () const</li>
</ul>
<ul>
<li><div class="fn"/>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li><div class="fn"/>12 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h3>Public Slots</h3>
<ul>
<li><div class="fn"/>bool <b><a href="qwidget.html#close">close</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#hide">hide</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#lower">lower</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#raise">raise</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#repaint">repaint</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setDisabled">setDisabled</a></b> ( bool <i>disable</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#enabled-prop">setEnabled</a></b> ( bool )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setFocus-2">setFocus</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setHidden">setHidden</a></b> ( bool <i>hidden</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#styleSheet-prop">setStyleSheet</a></b> ( const QString &amp; <i>styleSheet</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#visible-prop">setVisible</a></b> ( bool <i>visible</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#windowModified-prop">setWindowModified</a></b> ( bool )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#windowTitle-prop">setWindowTitle</a></b> ( const QString &amp; )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#show">show</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#showFullScreen">showFullScreen</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#showMaximized">showMaximized</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#showMinimized">showMinimized</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#showNormal">showNormal</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#update">update</a></b> ()</li>
</ul>
<ul>
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h3>Signals</h3>
<ul>
<li><div class="fn"/>void <b><a href="qwidget.html#customContextMenuRequested">customContextMenuRequested</a></b> ( const QPoint &amp; <i>pos</i> )</li>
</ul>
<ul>
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h3>Static Public Members</h3>
<ul>
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#find">find</a></b> ( WId <i>id</i> )</li>
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#keyboardGrabber">keyboardGrabber</a></b> ()</li>
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#mouseGrabber">mouseGrabber</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qwidget.html#setTabOrder">setTabOrder</a></b> ( QWidget * <i>first</i>, QWidget * <i>second</i> )</li>
</ul>
<ul>
<li><div class="fn"/>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h3>Protected Functions</h3>
<ul>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#actionEvent">actionEvent</a></b> ( QActionEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#changeEvent">changeEvent</a></b> ( QEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#closeEvent">closeEvent</a></b> ( QCloseEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#contextMenuEvent">contextMenuEvent</a></b> ( QContextMenuEvent * <i>event</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#create">create</a></b> ( WId <i>window</i> = 0, bool <i>initializeWindow</i> = true, bool <i>destroyOldWindow</i> = true )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#destroy">destroy</a></b> ( bool <i>destroyWindow</i> = true, bool <i>destroySubWindows</i> = true )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#dragEnterEvent">dragEnterEvent</a></b> ( QDragEnterEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#dragLeaveEvent">dragLeaveEvent</a></b> ( QDragLeaveEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#dragMoveEvent">dragMoveEvent</a></b> ( QDragMoveEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#dropEvent">dropEvent</a></b> ( QDropEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#enterEvent">enterEvent</a></b> ( QEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual bool <b><a href="qwidget.html#event">event</a></b> ( QEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#focusInEvent">focusInEvent</a></b> ( QFocusEvent * <i>event</i> )</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#focusNextChild">focusNextChild</a></b> ()</li>
<li><div class="fn"/>virtual bool <b><a href="qwidget.html#focusNextPrevChild">focusNextPrevChild</a></b> ( bool <i>next</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#focusOutEvent">focusOutEvent</a></b> ( QFocusEvent * <i>event</i> )</li>
<li><div class="fn"/>bool <b><a href="qwidget.html#focusPreviousChild">focusPreviousChild</a></b> ()</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#hideEvent">hideEvent</a></b> ( QHideEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#inputMethodEvent">inputMethodEvent</a></b> ( QInputMethodEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a></b> ( QKeyEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#leaveEvent">leaveEvent</a></b> ( QEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual bool <b><a href="qwidget.html#macEvent">macEvent</a></b> ( EventHandlerCallRef <i>caller</i>, EventRef <i>event</i> )</li>
<li><div class="fn"/>virtual int <b><a href="qwidget.html#metric">metric</a></b> ( PaintDeviceMetric <i>m</i> ) const</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> ( QMouseEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a></b> ( QMouseEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#mousePressEvent">mousePressEvent</a></b> ( QMouseEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a></b> ( QMouseEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#moveEvent">moveEvent</a></b> ( QMoveEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual bool <b><a href="qwidget.html#qwsEvent">qwsEvent</a></b> ( QWSEvent * <i>event</i> )</li>
<li><div class="fn"/>void <b><a href="qwidget.html#resetInputContext">resetInputContext</a></b> ()</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#showEvent">showEvent</a></b> ( QShowEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#tabletEvent">tabletEvent</a></b> ( QTabletEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qwidget.html#wheelEvent">wheelEvent</a></b> ( QWheelEvent * <i>event</i> )</li>
<li><div class="fn"/>virtual bool <b><a href="qwidget.html#winEvent">winEvent</a></b> ( MSG * <i>message</i>, long * <i>result</i> )</li>
<li><div class="fn"/>virtual bool <b><a href="qwidget.html#x11Event">x11Event</a></b> ( XEvent * <i>event</i> )</li>
</ul>
<ul>
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div class="fn"/>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<a name="protected-slots"></a>
<h3>Protected Slots</h3>
<ul>
<li><div class="fn"/>void <b><a href="qwidget.html#updateMicroFocus">updateMicroFocus</a></b> ()</li>
</ul>
<a name="related-non-members"></a>
<h3>Related Non-Members</h3>
<ul>
<li><div class="fn"/>typedef <b><a href="qwidget.html#QWidgetList-typedef">QWidgetList</a></b></li>
<li><div class="fn"/>typedef <b><a href="qwidget.html#WId-typedef">WId</a></b></li>
</ul>
<a name="macros"></a>
<h3>Macros</h3>
<ul>
<li><div class="fn"/><b><a href="qwidget.html#QWIDGETSIZE_MAX">QWIDGETSIZE_MAX</a></b></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QWidget class is the base class of all user interface objects.</p>
<p>The widget is the atom of the user interface: it receives mouse, keyboard and other events from the window system, and paints a representation of itself on the screen. Every widget is rectangular, and they are sorted in a Z-order. A widget is clipped by its parent and by the widgets in front of it.</p>
<p>A widget that isn't embedded in a parent widget is called a window. Usually, windows have a frame and a title bar, although it is also possible to create windows without such decoration using suitable <a href="qt.html#WindowType-enum">window flags</a>). In Qt, <a href="qmainwindow.html">QMainWindow</a> and the various subclasses of <a href="qdialog.html">QDialog</a> are the most common window types.</p>
<p>Every widget's constructor accepts one or two standard arguments:</p>
<ol type="1">
<li><tt>QWidget *parent = 0</tt> is the parent of the new widget. If it is 0 (the default), the new widget will be a window. If not, it will be a child of <i>parent</i>, and be constrained by <i>parent</i>'s geometry (unless you specify <a href="qt.html#WindowType-enum">Qt::Window</a> as window flag).</li>
<li><tt>Qt::WindowFlags f = 0</tt> (where available) sets the window flags; the default is suitable for almost all widgets, but to get, for example, a window without a window system frame, you must use special flags.</li>
</ol>
<p>QWidget has many member functions, but some of them have little direct functionality; for example, QWidget has a font property, but never uses this itself. There are many subclasses which provide real functionality, such as <a href="qlabel.html">QLabel</a>, <a href="qpushbutton.html">QPushButton</a>, <a href="qlistwidget.html">QListWidget</a>, and <a href="qtabwidget.html">QTabWidget</a>.</p>
<a name="top-level-and-child-widgets"></a>
<h3>Top-Level and Child Widgets</h3>
<p>A widget without a parent widget is always an independent window (top-level widget). For these widgets, <a href="qwidget.html#windowTitle-prop">setWindowTitle</a>() and <a href="qwidget.html#windowIcon-prop">setWindowIcon</a>() set the title bar and icon respectively.</p>
<p>Non-window widgets are child widgets, and are displayed within their parent widgets. Most widgets in Qt are mainly useful as child widgets. For example, it is possible to display a button as a top-level window, but most people prefer to put their buttons inside other widgets, such as <a href="qdialog.html">QDialog</a>.</p>
<p align="center"><img src="images/parent-child-widgets.png" alt="A parent widget containing various child widgets." /></p><p>The above diagram shows a <a href="qgroupbox.html">QGroupBox</a> widget being used to hold various child widgets in a layout provided by <a href="qgridlayout.html">QGridLayout</a>. The <a href="qlabel.html">QLabel</a> child widgets have been outlined to indicate their full sizes.</p>
<p>If you want to use a QWidget to hold child widgets you will usually want to add a layout to the parent QWidget. See <a href="layout.html">Layout Classes</a> for more information about these.</p>
<a name="composite-widgets"></a>
<h3>Composite Widgets</h3>
<p>When a widgets is used as a container to group a number of child widgets, it is known as a composite widget. These can be created by constructing a widget with the required visual properties - a <a href="qframe.html">QFrame</a>, for example - and adding child widgets to it, usually managed by a layout. The above diagram shows such a composite widget that was created using <a href="designer-manual.html#qt-designer">Qt Designer</a>.</p>
<p>Composite widgets can also be created by subclassing a standard widget, such as QWidget or <a href="qframe.html">QFrame</a>, and adding the necessary layout and child widgets in the constructor of the subclass. Many of the <a href="examples.html">examples provided with Qt</a> use this approach, and it is also covered in the <a href="tutorial.html">Qt Tutorial</a>.</p>
<a name="custom-widgets-and-painting"></a>
<h3>Custom Widgets and Painting</h3>
<p>Since QWidget is a subclass of <a href="qpaintdevice.html">QPaintDevice</a>, subclasses can be used to display custom content that is composed using a series of painting operations with an instance of the <a href="qpainter.html">QPainter</a> class. This approach contrasts with the canvas-style approach used by the <a href="graphicsview.html#graphics-view">Graphics View Framework</a> where items are added to a scene by the application and are rendered by the framework itself.</p>
<p>Each widget performs all painting operations from within its <a href="qwidget.html#paintEvent">paintEvent</a>() function. This is called whenever the widget needs to be redrawn, either as a result of some external change or when requested by the application.</p>
<p>The <a href="widgets-analogclock.html">Analog Clock example</a> shows how a simple widget can handle paint events.</p>
<a name="size-hints-and-size-policies"></a>
<h3>Size Hints and Size Policies</h3>
<p>When implementing a new widget, it is almost always useful to reimplement <a href="qwidget.html#sizeHint-prop">sizeHint</a>() to provide a reasonable default size for the widget and to set the correct size policy with <a href="qwidget.html#sizePolicy-prop">setSizePolicy</a>().</p>
<p>By default, composite widgets which do not provide a size hint will be sized according to the space requirements of their child widgets.</p>
<p>The size policy lets you supply good default behavior for the layout management system, so that other widgets can contain and manage yours easily. The default size policy indicates that the size hint represents the preferred size of the widget, and this is often good enough for many widgets.</p>
<a name="events"></a>
<h3>Events</h3>
<p>Widgets respond to events that are typically caused by user actions. Qt delivers events to widgets by calling specific event handler functions with instances of <a href="qevent.html">QEvent</a> subclasses containing information about each event.</p>
<p>If your widget only contains child widgets, you probably do not need to implement any event handlers. If you want to detect a mouse click in a child widget call the child's <a href="qwidget.html#underMouse">underMouse</a>() function inside the widget's <a href="qwidget.html#mousePressEvent">mousePressEvent</a>().</p>
<p>The <a href="widgets-scribble.html">Scribble example</a> implements a wider set of events to handle mouse movement, button presses, and window resizing.</p>
<p>You will need to supply the behavior and content for your own widgets, but here is a brief overview of the events that are relevant to QWidget, starting with the most common ones:</p>
<ul>
<li><a href="qwidget.html#paintEvent">paintEvent</a>() is called whenever the widget needs to be repainted. Every widget which displays custom content must implement it. Painting using a <a href="qpainter.html">QPainter</a> can only take place in a <a href="qwidget.html#paintEvent">paintEvent</a>() or a function called by a <a href="qwidget.html#paintEvent">paintEvent</a>().</li>
<li><a href="qwidget.html#resizeEvent">resizeEvent</a>() is called when the widget has been resized.</li>
<li><a href="qwidget.html#mousePressEvent">mousePressEvent</a>() is called when a mouse button is pressed when the mouse is inside it, or when it has grabbed the mouse using <a href="qwidget.html#grabMouse">grabMouse</a>().</li>
<li><a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>() is called when a mouse button is released. A widget receives mouse release events when it has received the corresponding mouse press event. This means that if the user presses the mouse inside <i>your</i> widget, then drags the mouse to somewhere else before releasing the mouse button, <i>your</i> widget receives the release event. There is one exception: if a popup menu appears while the mouse button is held down, this popup immediately steals the mouse events.</li>
<li><a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>() is called when the user double clicks in the widget. If the user double-clicks, the widget receives a mouse press event, a mouse release event and finally this event instead of a second mouse press event. (Some mouse move events may also be received if the user doesn't hold the mouse steady during this operation.) It is <i>not possible</i> to distinguish a click from a double click until the second click arrives. (This is one reason why most GUI books recommend that double clicks be an extension of single clicks, rather than trigger a different action.)</li>
</ul>
<p>Widgets that accept keyboard input need to reimplement a few more event handlers:</p>
<ul>
<li><a href="qwidget.html#keyPressEvent">keyPressEvent</a>() is called whenever a key is pressed, and again when a key has been held down long enough for it to auto-repeat. Note that the <b>Tab</b> and <b>Shift+Tab</b> keys are only passed to the widget if they are not used by the focus-change mechanisms. To force those keys to be processed by your widget, you must reimplement <a href="qwidget.html#event">QWidget::event</a>().</li>
<li><a href="qwidget.html#focusInEvent">focusInEvent</a>() is called when the widget gains keyboard focus (assuming you have called <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>()). Well written widgets indicate that they own the keyboard focus in a clear but discreet way.</li>
<li><a href="qwidget.html#focusOutEvent">focusOutEvent</a>() is called when the widget loses keyboard focus.</li>
</ul>
<p>Some widgets will also need to reimplement some of the less common event handlers:</p>
<ul>
<li><a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>() is called whenever the mouse moves while a button is held down. This can be useful during drag and drop operations. If you call setMouseTracking(true), you get mouse move events even when no buttons are held down. (See also the guide to <a href="dnd.html">Drag and Drop</a>.)</li>
<li><a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>() is called whenever a key is released, and also while it is held down if the key is auto-repeating. In that case the widget receives a pair of key release and key press events for every repeat. Note that the <b>Tab</b> and <b>Shift+Tab</b> keys are only passed to the widget if they are not used by the focus-change mechanisms. To force those keys to be processed by your widget, you must reimplement <a href="qwidget.html#event">QWidget::event</a>().</li>
<li><a href="qwidget.html#wheelEvent">wheelEvent</a>() is called whenever the user turns the mouse wheel while the widget has the focus.</li>
<li><a href="qwidget.html#enterEvent">enterEvent</a>() is called when the mouse enters the widget's screen space. (This excludes screen space owned by any children of the widget.)</li>
<li><a href="qwidget.html#leaveEvent">leaveEvent</a>() is called when the mouse leaves the widget's screen space. Note that if the mouse enters a child widget it will not cause a leaveEvent.</li>
<li><a href="qwidget.html#moveEvent">moveEvent</a>() is called when the widget has been moved relative to its parent.</li>
<li><a href="qwidget.html#closeEvent">closeEvent</a>() is called when the user closes the widget (or when <a href="qwidget.html#close">close</a>() is called).</li>
</ul>
<p>There are also some rather obscure events described in the <a href="qevent.html#Type-enum">QEvent::Type</a> documentation. You need to reimplement <a href="qwidget.html#event">event</a>() directly to handle these. The default implementation of <a href="qwidget.html#event">event</a>() handles <b>Tab</b> and <b>Shift+Tab</b> (to move the keyboard focus), and passes on most other events to one of the more specialized handlers above.</p>
<p>Events and the mechanism used to deliver them are covered in the <a href="eventsandfilters.html">Events and Event Filters</a> document.</p>
<a name="groups-of-functions-and-properties"></a>
<h3>Groups of Functions and Properties</h3>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Context</th><th>Functions and Properties</th></tr></thead>
<tr valign="top" class="odd"><td>Window functions</td><td><a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#raise">raise</a>(), <a href="qwidget.html#lower">lower</a>(), <a href="qwidget.html#close">close</a>().</td></tr>
<tr valign="top" class="even"><td>Top-level windows</td><td><a href="qwidget.html#windowModified-prop">windowModified</a>, <a href="qwidget.html#windowTitle-prop">windowTitle</a>, <a href="qwidget.html#windowIcon-prop">windowIcon</a>, <a href="qwidget.html#windowIconText-prop">windowIconText</a>, <a href="qwidget.html#isActiveWindow-prop">isActiveWindow</a>, <a href="qwidget.html#activateWindow">activateWindow</a>(), <a href="qwidget.html#minimized-prop">minimized</a>, <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#maximized-prop">maximized</a>, <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#fullScreen-prop">fullScreen</a>, <a href="qwidget.html#showFullScreen">showFullScreen</a>(), <a href="qwidget.html#showNormal">showNormal</a>().</td></tr>
<tr valign="top" class="odd"><td>Window contents</td><td><a href="qwidget.html#update">update</a>(), <a href="qwidget.html#repaint">repaint</a>(), <a href="qwidget.html#scroll">scroll</a>().</td></tr>
<tr valign="top" class="even"><td>Geometry</td><td><a href="qwidget.html#pos-prop">pos</a>, <a href="qwidget.html#x-prop">x</a>(), <a href="qwidget.html#y-prop">y</a>(), <a href="qwidget.html#rect-prop">rect</a>, <a href="qwidget.html#size-prop">size</a>, <a href="qwidget.html#width-prop">width</a>(), <a href="qwidget.html#height-prop">height</a>(), <a href="qwidget.html#pos-prop">move</a>(), <a href="qwidget.html#size-prop">resize</a>(), <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>, <a href="qwidget.html#sizeHint-prop">sizeHint</a>(), <a href="qwidget.html#minimumSizeHint-prop">minimumSizeHint</a>(), <a href="qwidget.html#updateGeometry">updateGeometry</a>(), <a href="qwidget.html#layout">layout</a>(), <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#childrenRect-prop">childrenRect</a>, <a href="qwidget.html#childrenRegion-prop">childrenRegion</a>, <a href="qwidget.html#adjustSize">adjustSize</a>(), <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>(), <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), <a href="qwidget.html#mapFromParent">mapFromParent</a>(), <a href="qwidget.html#mapToParent">mapToParent</a>(), <a href="qwidget.html#maximumSize-prop">maximumSize</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>, <a href="qwidget.html#baseSize-prop">baseSize</a>, <a href="qwidget.html#setFixedSize">setFixedSize</a>()</td></tr>
<tr valign="top" class="odd"><td>Mode</td><td><a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#isVisibleTo">isVisibleTo</a>(), <a href="qwidget.html#enabled-prop">enabled</a>, <a href="qwidget.html#isEnabledTo">isEnabledTo</a>(), <a href="qwidget.html#modal-prop">modal</a>, <a href="qwidget.html#isWindow">isWindow</a>(), <a href="qwidget.html#mouseTracking-prop">mouseTracking</a>, <a href="qwidget.html#updatesEnabled-prop">updatesEnabled</a>, <a href="qwidget.html#visibleRegion">visibleRegion</a>().</td></tr>
<tr valign="top" class="even"><td>Look and feel</td><td><a href="qwidget.html#style">style</a>(), <a href="qwidget.html#setStyle">setStyle</a>(), <a href="qwidget.html#styleSheet-prop">styleSheet</a>, <a href="qwidget.html#cursor-prop">cursor</a>, <a href="qwidget.html#font-prop">font</a>, <a href="qwidget.html#palette-prop">palette</a>, <a href="qwidget.html#backgroundRole">backgroundRole</a>(), <a href="qwidget.html#setBackgroundRole">setBackgroundRole</a>(), <a href="qwidget.html#fontInfo">fontInfo</a>(), <a href="qwidget.html#fontMetrics">fontMetrics</a>().</td></tr>
<tr valign="top" class="odd"><td>Keyboard focus functions</td><td><a href="qwidget.html#focus-prop">focus</a>, <a href="qwidget.html#focusPolicy-prop">focusPolicy</a>, <a href="qwidget.html#setFocus">setFocus</a>(), <a href="qwidget.html#clearFocus">clearFocus</a>(), <a href="qwidget.html#setTabOrder">setTabOrder</a>(), <a href="qwidget.html#setFocusProxy">setFocusProxy</a>(), <a href="qwidget.html#focusNextChild">focusNextChild</a>(), <a href="qwidget.html#focusPreviousChild">focusPreviousChild</a>().</td></tr>
<tr valign="top" class="even"><td>Mouse and keyboard grabbing</td><td><a href="qwidget.html#grabMouse">grabMouse</a>(), <a href="qwidget.html#releaseMouse">releaseMouse</a>(), <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>(), <a href="qwidget.html#mouseGrabber">mouseGrabber</a>(), <a href="qwidget.html#keyboardGrabber">keyboardGrabber</a>().</td></tr>
<tr valign="top" class="odd"><td>Event handlers</td><td><a href="qwidget.html#event">event</a>(), <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#wheelEvent">wheelEvent</a>(), <a href="qwidget.html#enterEvent">enterEvent</a>(), <a href="qwidget.html#leaveEvent">leaveEvent</a>(), <a href="qwidget.html#paintEvent">paintEvent</a>(), <a href="qwidget.html#moveEvent">moveEvent</a>(), <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qwidget.html#closeEvent">closeEvent</a>(), <a href="qwidget.html#dragEnterEvent">dragEnterEvent</a>(), <a href="qwidget.html#dragMoveEvent">dragMoveEvent</a>(), <a href="qwidget.html#dragLeaveEvent">dragLeaveEvent</a>(), <a href="qwidget.html#dropEvent">dropEvent</a>(), <a href="qobject.html#childEvent">childEvent</a>(), <a href="qwidget.html#showEvent">showEvent</a>(), <a href="qwidget.html#hideEvent">hideEvent</a>(), <a href="qobject.html#customEvent">customEvent</a>(). <a href="qwidget.html#changeEvent">changeEvent</a>(),</td></tr>
<tr valign="top" class="even"><td>System functions</td><td><a href="qwidget.html#parentWidget">parentWidget</a>(), <a href="qwidget.html#window">window</a>(), <a href="qwidget.html#setParent">setParent</a>(), <a href="qwidget.html#winId">winId</a>(), <a href="qwidget.html#find">find</a>(), <a href="qwidget.html#metric">metric</a>().</td></tr>
<tr valign="top" class="odd"><td>Interactive help</td><td><a href="qwidget.html#toolTip-prop">setToolTip</a>(), <a href="qwidget.html#whatsThis-prop">setWhatsThis</a>()</td></tr>
</table></p>
<a name="widget-style-sheets"></a>
<h3>Widget Style Sheets</h3>
<p>In addition to the standard widget styles for each platform, widgets can also be styled according to rules specified in a <a href="qwidget.html#styleSheet-prop">style sheet</a>. This feature enables you to customize the appearance of specific widgets to provide visual cues to users about their purpose; for example, a button could be styled in a particular way to indicate that it performs a destructive action.</p>
<p>The use of widgets style sheets is described in more detail in <a href="stylesheet.html">Qt Style Sheets</a>.</p>
<a name="transparency-and-double-buffering"></a>
<h3>Transparency and Double Buffering</h3>
<p>From Qt 4.0, QWidget automatically double-buffers its painting, so there's no need to write double-buffering code in <a href="qwidget.html#paintEvent">paintEvent</a>() to avoid flicker. Additionally, it became possible for widgets to propagate their contents to children, in order to enable transparency effects, by setting the <a href="qt.html#WidgetAttribute-enum">Qt::WA_ContentsPropagated</a> widget attribute - this is now deprecated in Qt 4.1&#x2e;</p>
<p>In Qt 4.1, the contents of parent widgets are propagated by default to each of their children. Custom widgets can be written to take advantage of this feature by only updating irregular regions (to create non-rectangular child widgets), or by using painting with colors that have less than the full alpha component. The following diagram shows how attributes and properties of a custom widget can be fine-tuned to achieve different effects.</p>
<p align="center"><img src="images/propagation-custom.png" /></p><p>In the above diagram, a semi-transparent rectangular child widget with an area removed is constructed and added to a parent widget (a <a href="qlabel.html">QLabel</a> showing a pixmap) then different properties and widget attributes are set to achieve different effects:</p>
<ul>
<li>The left widget has no additional properties or widget attributes set. This default state suits most custom widgets that use transparency or are irregularly-shaped, and that do not paint over their entire area with an opaque brush.</li>
<li>The center widget has the <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> property set. This property is used with custom widgets that rely on the widget to supply a default background, and do not paint over their entire area with an opaque brush.</li>
<li>The right widget has the <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a> widget attribute set. This indicates that the widget will paint over its entire area with opaque colors. The widget's area will initially be <i>uninitialized</i> (represented in the diagram by a red diagonal grid pattern that shines through the overpainted area). This is useful for widgets that need to paint their own specialized contents quickly and that do not need a default filled background.</li>
</ul>
<p>For rapidly updating custom widgets with simple background colors, such as real-time plotting or graphing widgets, it is better to define a suitable background color (using <a href="qwidget.html#setBackgroundRole">setBackgroundRole</a>() with the <a href="qpalette.html#ColorRole-enum">QPalette::Window</a> role), set the <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> property, and only implement the necessary drawing functionality in the widget's <a href="qwidget.html#paintEvent">paintEvent</a>().</p>
<p>For rapidly updating custom widgets that constantly paint over their entire areas with opaque content, such as video streaming widgets, it is better to set the widget's <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a>, avoiding any unnecessary overhead associated with repainting the widget's background.</p>
<p>If a widget has both the <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a> widget attribute <i>and</i> the <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> property set, the <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a> attribute takes precedence. You should choose just one of these depending on your requirements.</p>
<p>In Qt 4.1, the contents of parent widgets are also propagated to standard Qt widgets. This can lead to some unexpected results if the parent widget is decorated in a non-standard way, as shown in the diagram below.</p>
<p align="center"><img src="images/propagation-standard.png" /></p><p>The scope for customizing the painting behavior of standard Qt widgets, without resorting to subclassing, is slightly less than that possible for custom widgets. Usually, the desired appearance of a standard widget can be achieved by setting its <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> property.</p>
<p>See also <a href="qevent.html">QEvent</a>, <a href="qpainter.html">QPainter</a>, <a href="qgridlayout.html">QGridLayout</a>, and <a href="qboxlayout.html">QBoxLayout</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<h3 class="flags"><a name="RenderFlag-enum"></a>enum QWidget::RenderFlag<br />flags QWidget::RenderFlags</h3>
<p>This enum describes how to render the widget when calling <a href="qwidget.html#render">QWidget::render</a>().</p>
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QWidget::DrawWindowBackground</tt></td><td align="center" valign="top"><tt>0x1</tt></td><td valign="top">If you enable this option, the widget's background is rendered into the target even if <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> is not set. By default, this option is enabled.</td></tr>
<tr><td valign="top"><tt>QWidget::DrawChildren</tt></td><td align="center" valign="top"><tt>0x2</tt></td><td valign="top">If you enable this option, the widget's children are rendered recursively into the target. By default, this option is enabled.</td></tr>
<tr><td valign="top"><tt>QWidget::IgnoreMask</tt></td><td align="center" valign="top"><tt>0x4</tt></td><td valign="top">If you enable this option, the widget's <a href="qwidget.html#mask">QWidget::mask</a>() is ignored when rendering into the target. By default, this option is disabled.</td></tr>
</table></p>
<p>This enum was introduced in Qt 4.3.</p>
<p>The RenderFlags type is a typedef for <a href="qflags.html">QFlags</a>&lt;RenderFlag&gt;. It stores an OR combination of RenderFlag values.</p>
<hr />
<h2>Property Documentation</h2>
<h3 class="fn"><a name="acceptDrops-prop"></a>acceptDrops : bool</h3>
<p>This property holds whether drop events are enabled for this widget.</p>
<p>Setting this property to true announces to the system that this widget <i>may</i> be able to accept drop events.</p>
<p>If the widget is the desktop (<a href="porting4.html#qwidget">QWidget::</a>(<a href="qwidget.html#windowType">windowType</a>() == <a href="qt.html#WindowType-enum">Qt::Desktop</a>)), this may fail if another application is using the desktop; you can call acceptDrops() to test if this occurs.</p>
<p><b>Warning:</b> Do not modify this property in a Drag&amp;Drop event handler.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool acceptDrops () const</b></li>
<li><div class="fn"/><b>void setAcceptDrops ( bool <i>on</i> )</b></li>
</ul>
<h3 class="fn"><a name="accessibleDescription-prop"></a>accessibleDescription : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's description as seen by assistive technologies.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QString accessibleDescription () const</b></li>
<li><div class="fn"/><b>void setAccessibleDescription ( const QString &amp; <i>description</i> )</b></li>
</ul>
<p>See also <a href="qaccessibleinterface.html#text">QAccessibleInterface::text</a>().</p>
<h3 class="fn"><a name="accessibleName-prop"></a>accessibleName : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's name as seen by assistive technologies.</p>
<p>It is be used by accessible clients to identify, find, or announce the widget for accessible clients.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QString accessibleName () const</b></li>
<li><div class="fn"/><b>void setAccessibleName ( const QString &amp; <i>name</i> )</b></li>
</ul>
<p>See also <a href="qaccessibleinterface.html#text">QAccessibleInterface::text</a>().</p>
<h3 class="fn"><a name="autoFillBackground-prop"></a>autoFillBackground : bool</h3>
<p>This property holds whether the widget background is filled automatically.</p>
<p>If enabled, this will cause Qt to fill the background using the widget's background role before invoking the paint event. The background role is defined by the widget's <a href="qwidget.html#palette-prop">palette</a>.</p>
<p>In addition, Windows are always filled with <a href="qpalette.html#ColorRole-enum">QPalette::Window</a>, unless the WA_OpaquePaintEvent or WA_NoSystemBackground attributes are set.</p>
<p><b>Warning:</b> Do not set this property when using <a href="stylesheet.html">Qt Style Sheets</a>. When using style sheets, the widget is always filled with the &quot;background&quot; property. The &quot;border-radius&quot; property may be used to clip the background.</p>
<p>This property was introduced in Qt 4.1.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool autoFillBackground () const</b></li>
<li><div class="fn"/><b>void setAutoFillBackground ( bool <i>enabled</i> )</b></li>
</ul>
<p>See also <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a> and <a href="qt.html#WidgetAttribute-enum">Qt::WA_NoSystemBackground</a>.</p>
<h3 class="fn"><a name="baseSize-prop"></a>baseSize : <a href="qsize.html">QSize</a></h3>
<p>This property holds the base size of the widget.</p>
<p>The base size is used to calculate a proper widget size if the widget defines <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>().</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QSize baseSize () const</b></li>
<li><div class="fn"/><b>void setBaseSize ( const QSize &amp; )</b></li>
<li><div class="fn"/><b>void setBaseSize ( int <i>basew</i>, int <i>baseh</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#sizeIncrement-prop">setSizeIncrement</a>().</p>
<h3 class="fn"><a name="childrenRect-prop"></a>childrenRect : const <a href="qrect.html">QRect</a></h3>
<p>This property holds the bounding rectangle of the widget's children.</p>
<p>Hidden children are excluded.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QRect childrenRect () const</b></li>
</ul>
<p>See also <a href="qwidget.html#childrenRegion-prop">childrenRegion</a>() and <a href="qwidget.html#geometry-prop">geometry</a>().</p>
<h3 class="fn"><a name="childrenRegion-prop"></a>childrenRegion : const <a href="qregion.html">QRegion</a></h3>
<p>This property holds the combined region occupied by the widget's children.</p>
<p>Hidden children are excluded.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QRegion childrenRegion () const</b></li>
</ul>
<p>See also <a href="qwidget.html#childrenRect-prop">childrenRect</a>(), <a href="qwidget.html#geometry-prop">geometry</a>(), and <a href="qwidget.html#mask">mask</a>().</p>
<h3 class="fn"><a name="contextMenuPolicy-prop"></a>contextMenuPolicy : <a href="qt.html#ContextMenuPolicy-enum">Qt::ContextMenuPolicy</a></h3>
<p>This property holds how the widget shows a context menu.</p>
<p>The default value of this property is <a href="qt.html#ContextMenuPolicy-enum">Qt::DefaultContextMenu</a>, which means the <a href="qwidget.html#contextMenuEvent">contextMenuEvent</a>() handler is called. Other values are <a href="qt.html#ContextMenuPolicy-enum">Qt::NoContextMenu</a>, <a href="qt.html#ContextMenuPolicy-enum">Qt::PreventContextMenu</a>, <a href="qt.html#ContextMenuPolicy-enum">Qt::ActionsContextMenu</a>, and <a href="qt.html#ContextMenuPolicy-enum">Qt::CustomContextMenu</a>. With <a href="qt.html#ContextMenuPolicy-enum">Qt::CustomContextMenu</a>, the signal <a href="qwidget.html#customContextMenuRequested">customContextMenuRequested</a>() is emitted.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>Qt::ContextMenuPolicy contextMenuPolicy () const</b></li>
<li><div class="fn"/><b>void setContextMenuPolicy ( Qt::ContextMenuPolicy <i>policy</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#contextMenuEvent">contextMenuEvent</a>(), <a href="qwidget.html#customContextMenuRequested">customContextMenuRequested</a>(), and <a href="qwidget.html#actions">actions</a>().</p>
<h3 class="fn"><a name="cursor-prop"></a>cursor : <a href="qcursor.html">QCursor</a></h3>
<p>This property holds the cursor shape for this widget.</p>
<p>The mouse cursor will assume this shape when it's over this widget. See the <a href="qt.html#CursorShape-enum">list of predefined cursor objects</a> for a range of useful shapes.</p>
<p>An editor widget might use an I-beam cursor:</p>
<pre> setCursor(Qt::IBeamCursor);</pre>
<p>If no cursor has been set, or after a call to unsetCursor(), the parent's cursor is used.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QCursor cursor () const</b></li>
<li><div class="fn"/><b>void setCursor ( const QCursor &amp; )</b></li>
<li><div class="fn"/><b>void unsetCursor ()</b></li>
</ul>
<p>See also <a href="qapplication.html#setOverrideCursor">QApplication::setOverrideCursor</a>().</p>
<h3 class="fn"><a name="enabled-prop"></a>enabled : bool</h3>
<p>This property holds whether the widget is enabled.</p>
<p>An enabled widget handles keyboard and mouse events; a disabled widget does not.</p>
<p>Some widgets display themselves differently when they are disabled. For example a button might draw its label grayed out. If your widget needs to know when it becomes enabled or disabled, you can use the <a href="qwidget.html#changeEvent">changeEvent</a>() with type <a href="qevent.html#Type-enum">QEvent::EnabledChange</a>.</p>
<p>Disabling a widget implicitly disables all its children. Enabling respectively enables all child widgets unless they have been explicitly disabled.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool isEnabled () const</b></li>
<li><div class="fn"/><b>void setEnabled ( bool )</b></li>
</ul>
<p>See also <a href="qwidget.html#isEnabledTo">isEnabledTo</a>(), <a href="qkeyevent.html">QKeyEvent</a>, <a href="qmouseevent.html">QMouseEvent</a>, and <a href="qwidget.html#changeEvent">changeEvent</a>().</p>
<h3 class="fn"><a name="focus-prop"></a>focus : const bool</h3>
<p>This property holds whether this widget (or its focus proxy) has the keyboard input focus.</p>
<p>Effectively equivalent to <tt>QApplication::focusWidget() == this</tt>.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool hasFocus () const</b></li>
</ul>
<p>See also <a href="qwidget.html#setFocus">setFocus</a>(), <a href="qwidget.html#clearFocus">clearFocus</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), and <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>().</p>
<h3 class="fn"><a name="focusPolicy-prop"></a>focusPolicy : <a href="qt.html#FocusPolicy-enum">Qt::FocusPolicy</a></h3>
<p>This property holds the way the widget accepts keyboard focus.</p>
<p>The policy is <a href="qt.html#FocusPolicy-enum">Qt::TabFocus</a> if the widget accepts keyboard focus by tabbing, <a href="qt.html#FocusPolicy-enum">Qt::ClickFocus</a> if the widget accepts focus by clicking, <a href="qt.html#FocusPolicy-enum">Qt::StrongFocus</a> if it accepts both, and <a href="qt.html#FocusPolicy-enum">Qt::NoFocus</a> (the default) if it does not accept focus at all.</p>
<p>You must enable keyboard focus for a widget if it processes keyboard events. This is normally done from the widget's constructor. For instance, the <a href="qlineedit.html">QLineEdit</a> constructor calls setFocusPolicy(<a href="qt.html#FocusPolicy-enum">Qt::StrongFocus</a>).</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>Qt::FocusPolicy focusPolicy () const</b></li>
<li><div class="fn"/><b>void setFocusPolicy ( Qt::FocusPolicy <i>policy</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), and <a href="qwidget.html#enabled-prop">enabled</a>.</p>
<h3 class="fn"><a name="font-prop"></a>font : <a href="qfont.html">QFont</a></h3>
<p>This property holds the font currently set for the widget.</p>
<p>The <a href="qwidget.html#fontInfo">fontInfo</a>() function reports the actual font that is being used by the widget.</p>
<p>As long as no special font has been set, or after setFont(<a href="porting4.html#qfont">QFont</a>()) is called, this is either a special font for the widget class, the parent's font or (if this widget is a top level widget), the default application font.</p>
<p>This code fragment sets a 12 point helvetica bold font:</p>
<pre> QFont font(&quot;Helvetica&quot;, 12, QFont::Bold);
 setFont(font);</pre>
<p>Note that when a child widget is given a different font to that of its parent widget, it will still inherit the parent's font <i>properties</i> unless these have been set explicitly on the child's font. For example, if the parent's font is bold, the child widget's font will be bold as well if not specified otherwise like this:</p>
<pre> QFont font;
 font.setBold(false);
 setFont(font);</pre>
<p>In addition to setting the font, setFont() informs all children about the change.</p>
<p><b>Warning:</b> Do not use this function in conjunction with <a href="stylesheet.html">Qt Style Sheets</a>. The font of a widget can be customized using the &quot;font&quot; style sheet property.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>const QFont &amp; font () const</b></li>
<li><div class="fn"/><b>void setFont ( const QFont &amp; )</b></li>
</ul>
<p>See also <a href="qwidget.html#fontInfo">fontInfo</a>() and <a href="qwidget.html#fontMetrics">fontMetrics</a>().</p>
<h3 class="fn"><a name="frameGeometry-prop"></a>frameGeometry : const <a href="qrect.html">QRect</a></h3>
<p>This property holds geometry of the widget relative to its parent including any window frame.</p>
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of geometry issues with windows.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QRect frameGeometry () const</b></li>
</ul>
<p>See also <a href="qwidget.html#geometry-prop">geometry</a>(), <a href="qwidget.html#x-prop">x</a>(), <a href="qwidget.html#y-prop">y</a>(), and <a href="qwidget.html#pos-prop">pos</a>().</p>
<h3 class="fn"><a name="frameSize-prop"></a>frameSize : const <a href="qsize.html">QSize</a></h3>
<p>This property holds the size of the widget including any window frame.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QSize frameSize () const</b></li>
</ul>
<h3 class="fn"><a name="fullScreen-prop"></a>fullScreen : const bool</h3>
<p>This property holds whether the widget is full screen.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool isFullScreen () const</b></li>
</ul>
<p>See also <a href="qwidget.html#windowState">windowState</a>(), <a href="qwidget.html#minimized-prop">minimized</a>, and <a href="qwidget.html#maximized-prop">maximized</a>.</p>
<h3 class="fn"><a name="geometry-prop"></a>geometry : <a href="qrect.html">QRect</a></h3>
<p>This property holds the geometry of the widget relative to its parent and excluding the window frame.</p>
<p>When changing the geometry, the widget, if visible, receives a move event (<a href="qwidget.html#moveEvent">moveEvent</a>()) and/or a resize event (<a href="qwidget.html#resizeEvent">resizeEvent</a>()) immediately. If the widget is not currently visible, it is guaranteed to receive appropriate events before it is shown.</p>
<p>The size component is adjusted if it lies outside the range defined by <a href="qwidget.html#minimumSize-prop">minimumSize</a>() and <a href="qwidget.html#maximumSize-prop">maximumSize</a>().</p>
<p><b>Warning:</b> Calling setGeometry() inside <a href="qwidget.html#resizeEvent">resizeEvent</a>() or <a href="qwidget.html#moveEvent">moveEvent</a>() can lead to infinite recursion.</p>
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>const QRect &amp; geometry () const</b></li>
<li><div class="fn"/><b>void setGeometry ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</b></li>
<li><div class="fn"/><b>void setGeometry ( const QRect &amp; )</b></li>
</ul>
<p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>(), <a href="qwidget.html#rect-prop">rect</a>(), <a href="qwidget.html#pos-prop">move</a>(), <a href="qwidget.html#size-prop">resize</a>(), <a href="qwidget.html#moveEvent">moveEvent</a>(), <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qwidget.html#minimumSize-prop">minimumSize</a>(), and <a href="qwidget.html#maximumSize-prop">maximumSize</a>().</p>
<h3 class="fn"><a name="height-prop"></a>height : const int</h3>
<p>This property holds the height of the widget excluding any window frame.</p>
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int height () const</b></li>
</ul>
<p>See also <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#width-prop">width</a>, and <a href="qwidget.html#size-prop">size</a>.</p>
<h3 class="fn"><a name="isActiveWindow-prop"></a>isActiveWindow : const bool</h3>
<p>This property holds whether this widget's window is the active window.</p>
<p>The active window is the window that contains the widget that has keyboard focus (The window may still have focus if it has no widgets or none of its widgets accepts keyboard focus).</p>
<p>When popup windows are visible, this property is true for both the active window <i>and</i> for the popup.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool isActiveWindow () const</b></li>
</ul>
<p>See also <a href="qwidget.html#activateWindow">activateWindow</a>() and <a href="qapplication.html#activeWindow">QApplication::activeWindow</a>().</p>
<h3 class="fn"><a name="layoutDirection-prop"></a>layoutDirection : <a href="qt.html#LayoutDirection-enum">Qt::LayoutDirection</a></h3>
<p>This property holds the layout direction for this widget.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>Qt::LayoutDirection layoutDirection () const</b></li>
<li><div class="fn"/><b>void setLayoutDirection ( Qt::LayoutDirection <i>direction</i> )</b></li>
<li><div class="fn"/><b>void unsetLayoutDirection ()</b></li>
</ul>
<p>See also <a href="qapplication.html#layoutDirection-prop">QApplication::layoutDirection</a>.</p>
<h3 class="fn"><a name="locale-prop"></a>locale : <a href="qlocale.html">QLocale</a></h3>
<p>This property holds the widget's locale.</p>
<p>As long as no special locale has been set, this is either the parent's locale or (if this widget is a top level widget), the default locale.</p>
<p>If the widget displays dates or numbers, these should be formatted using the widget's locale.</p>
<p>This property was introduced in Qt 4.3.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QLocale locale () const</b></li>
<li><div class="fn"/><b>void setLocale ( const QLocale &amp; <i>locale</i> )</b></li>
<li><div class="fn"/><b>void unsetLocale ()</b></li>
</ul>
<p>See also <a href="qlocale.html">QLocale</a> and <a href="qlocale.html#setDefault">QLocale::setDefault</a>().</p>
<h3 class="fn"><a name="maximized-prop"></a>maximized : const bool</h3>
<p>This property holds whether this widget is maximized.</p>
<p>This property is only relevant for windows.</p>
<p>Note that due to limitations in some window-systems, this does not always report the expected results (e.g&#x2e; if the user on X11 maximizes the window via the window manager, Qt has no way of distinguishing this from any other resize). This is expected to improve as window manager protocols evolve.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool isMaximized () const</b></li>
</ul>
<p>See also <a href="qwidget.html#windowState">windowState</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), and <a href="qwidget.html#minimized-prop">minimized</a>.</p>
<h3 class="fn"><a name="maximumHeight-prop"></a>maximumHeight : int</h3>
<p>This property holds the widget's maximum height.</p>
<p>This property corresponds to <a href="qwidget.html#maximumSize-prop">maximumSize</a>().<a href="qwidget.html#height-prop">height</a>(). It is limited by the <a href="qwidget.html#QWIDGETSIZE_MAX">QWIDGETSIZE_MAX</a> macro, i.e&#x2e; the largest allowed height is 16777215.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int maximumHeight () const</b></li>
<li><div class="fn"/><b>void setMaximumHeight ( int <i>maxh</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#maximumSize-prop">maximumSize</a> and <a href="qwidget.html#maximumWidth-prop">maximumWidth</a>.</p>
<h3 class="fn"><a name="maximumSize-prop"></a>maximumSize : <a href="qsize.html">QSize</a></h3>
<p>This property holds the widget's maximum size.</p>
<p>The widget cannot be resized to a larger size than the maximum widget size.</p>
<p>The property is limited by the <a href="qwidget.html#QWIDGETSIZE_MAX">QWIDGETSIZE_MAX</a> macro, i.e&#x2e; the largest allowed size is <a href="qsize.html">QSize</a>(16777215, 16777215).</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QSize maximumSize () const</b></li>
<li><div class="fn"/><b>void setMaximumSize ( const QSize &amp; )</b></li>
<li><div class="fn"/><b>void setMaximumSize ( int <i>maxw</i>, int <i>maxh</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#maximumWidth-prop">maximumWidth</a>, <a href="qwidget.html#maximumHeight-prop">maximumHeight</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, and <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>.</p>
<h3 class="fn"><a name="maximumWidth-prop"></a>maximumWidth : int</h3>
<p>This property holds the widget's maximum width.</p>
<p>This property corresponds to <a href="qwidget.html#maximumSize-prop">maximumSize</a>().<a href="qwidget.html#width-prop">width</a>(). It is limited by the <a href="qwidget.html#QWIDGETSIZE_MAX">QWIDGETSIZE_MAX</a> macro, i.e&#x2e; the largest allowed width is 16777215.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int maximumWidth () const</b></li>
<li><div class="fn"/><b>void setMaximumWidth ( int <i>maxw</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#maximumSize-prop">maximumSize</a> and <a href="qwidget.html#maximumHeight-prop">maximumHeight</a>.</p>
<h3 class="fn"><a name="minimized-prop"></a>minimized : const bool</h3>
<p>This property holds whether this widget is minimized (iconified).</p>
<p>This property is only relevant for windows.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool isMinimized () const</b></li>
</ul>
<p>See also <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), and <a href="qwidget.html#maximized-prop">maximized</a>.</p>
<h3 class="fn"><a name="minimumHeight-prop"></a>minimumHeight : int</h3>
<p>This property holds the widget's minimum height.</p>
<p>This property corresponds to <a href="qwidget.html#minimumSize-prop">minimumSize</a>().<a href="qwidget.html#height-prop">height</a>().</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int minimumHeight () const</b></li>
<li><div class="fn"/><b>void setMinimumHeight ( int <i>minh</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#minimumSize-prop">minimumSize</a> and <a href="qwidget.html#minimumWidth-prop">minimumWidth</a>.</p>
<h3 class="fn"><a name="minimumSize-prop"></a>minimumSize : <a href="qsize.html">QSize</a></h3>
<p>This property holds the widget's minimum size.</p>
<p>The widget cannot be resized to a smaller size than the minimum widget size. The widget's size is forced to the minimum size if the current size is smaller.</p>
<p>The minimum size set by this function will override the minimum size defined by <a href="qlayout.html">QLayout</a>. In order to unset the minimum size, use <a href="qsize.html">QSize</a>(0, 0).</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QSize minimumSize () const</b></li>
<li><div class="fn"/><b>void setMinimumSize ( const QSize &amp; )</b></li>
<li><div class="fn"/><b>void setMinimumSize ( int <i>minw</i>, int <i>minh</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#minimumWidth-prop">minimumWidth</a>, <a href="qwidget.html#minimumHeight-prop">minimumHeight</a>, <a href="qwidget.html#maximumSize-prop">maximumSize</a>, and <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>.</p>
<h3 class="fn"><a name="minimumSizeHint-prop"></a>minimumSizeHint : const <a href="qsize.html">QSize</a></h3>
<p>This property holds the recommended minimum size for the widget.</p>
<p>If the value of this property is an invalid size, no minimum size is recommended.</p>
<p>The default implementation of minimumSizeHint() returns an invalid size if there is no layout for this widget, and returns the layout's minimum size otherwise. Most built-in widgets reimplement minimumSizeHint().</p>
<p><a href="qlayout.html">QLayout</a> will never resize a widget to a size smaller than the minimum size hint unless <a href="qwidget.html#minimumSize-prop">minimumSize</a>() is set or the size policy is set to QSizePolicy::Ignore. If <a href="qwidget.html#minimumSize-prop">minimumSize</a>() is set, the minimum size hint will be ignored.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>virtual QSize minimumSizeHint () const</b></li>
</ul>
<p>See also <a href="qsize.html#isValid">QSize::isValid</a>(), <a href="qwidget.html#size-prop">resize</a>(), <a href="qwidget.html#minimumSize-prop">setMinimumSize</a>(), and <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>().</p>
<h3 class="fn"><a name="minimumWidth-prop"></a>minimumWidth : int</h3>
<p>This property holds the widget's minimum width.</p>
<p>This property corresponds to <a href="qwidget.html#minimumSize-prop">minimumSize</a>().<a href="qwidget.html#width-prop">width</a>().</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int minimumWidth () const</b></li>
<li><div class="fn"/><b>void setMinimumWidth ( int <i>minw</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#minimumSize-prop">minimumSize</a> and <a href="qwidget.html#minimumHeight-prop">minimumHeight</a>.</p>
<h3 class="fn"><a name="modal-prop"></a>modal : const bool</h3>
<p>This property holds whether the widget is a modal widget.</p>
<p>This property only makes sense for windows. A modal widget prevents widgets in all other windows from getting any input.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool isModal () const</b></li>
</ul>
<p>See also <a href="qwidget.html#isWindow">isWindow</a>(), <a href="qwidget.html#windowModality-prop">windowModality</a>, and <a href="qdialog.html">QDialog</a>.</p>
<h3 class="fn"><a name="mouseTracking-prop"></a>mouseTracking : bool</h3>
<p>This property holds whether mouse tracking is enabled for the widget.</p>
<p>If mouse tracking is disabled (the default), the widget only receives mouse move events when at least one mouse button is pressed while the mouse is being moved.</p>
<p>If mouse tracking is enabled, the widget receives mouse move events even if no buttons are pressed.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool hasMouseTracking () const</b></li>
<li><div class="fn"/><b>void setMouseTracking ( bool <i>enable</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>().</p>
<h3 class="fn"><a name="normalGeometry-prop"></a>normalGeometry : const <a href="qrect.html">QRect</a></h3>
<p>This property holds the geometry of the widget as it will appear when shown as a normal (not maximized or fullscreen) toplevel widget.</p>
<p>For child widgets this property always holds an empty rect.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QRect normalGeometry () const</b></li>
</ul>
<p>See also <a href="qwidget.html#windowState">QWidget::windowState</a>() and <a href="qwidget.html#geometry-prop">QWidget::geometry</a>.</p>
<h3 class="fn"><a name="palette-prop"></a>palette : <a href="qpalette.html">QPalette</a></h3>
<p>This property holds the widget's palette.</p>
<p>As long as no special palette has been set, this is either a special palette for the widget class, the parent's palette or (if this widget is a top level widget), the default application palette.</p>
<p><b>Note:</b> The palette's background color will only have an effect on the appearance of the widget if the <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> property is set.</p>
<p><b>Warning:</b> Do not use this function in conjunction with <a href="stylesheet.html">Qt Style Sheets</a>. When using style sheets, the palette of a widget can be customized using the &quot;color&quot;, &quot;background-color&quot;, &quot;selection-color&quot;, &quot;selection-background-color&quot; and &quot;alternate-background-color&quot;.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>const QPalette &amp; palette () const</b></li>
<li><div class="fn"/><b>void setPalette ( const QPalette &amp; )</b></li>
</ul>
<p>See also <a href="qapplication.html#palette">QApplication::palette</a>().</p>
<h3 class="fn"><a name="pos-prop"></a>pos : <a href="qpoint.html">QPoint</a></h3>
<p>This property holds the position of the widget within its parent widget.</p>
<p>If the widget is a window, the position is that of the widget on the desktop, including its frame.</p>
<p>When changing the position, the widget, if visible, receives a move event (<a href="qwidget.html#moveEvent">moveEvent</a>()) immediately. If the widget is not currently visible, it is guaranteed to receive an event before it is shown.</p>
<p><b>Warning:</b> Calling move() or <a href="qwidget.html#geometry-prop">setGeometry</a>() inside <a href="qwidget.html#moveEvent">moveEvent</a>() can lead to infinite recursion.</p>
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QPoint pos () const</b></li>
<li><div class="fn"/><b>void move ( int <i>x</i>, int <i>y</i> )</b></li>
<li><div class="fn"/><b>void move ( const QPoint &amp; )</b></li>
</ul>
<p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#size-prop">size</a>, <a href="qwidget.html#x-prop">x</a>(), and <a href="qwidget.html#y-prop">y</a>().</p>
<h3 class="fn"><a name="rect-prop"></a>rect : const <a href="qrect.html">QRect</a></h3>
<p>This property holds the internal geometry of the widget excluding any window frame.</p>
<p>The rect property equals <a href="qrect.html">QRect</a>(0, 0, <a href="qwidget.html#width-prop">width</a>(), <a href="qwidget.html#height-prop">height</a>()).</p>
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QRect rect () const</b></li>
</ul>
<p>See also <a href="qwidget.html#size-prop">size</a>.</p>
<h3 class="fn"><a name="size-prop"></a>size : <a href="qsize.html">QSize</a></h3>
<p>This property holds the size of the widget excluding any window frame.</p>
<p>If the widget is visible when it is being resized, it receives a resize event (<a href="qwidget.html#resizeEvent">resizeEvent</a>()) immediately. If the widget is not currently visible, it is guaranteed to receive an event before it is shown.</p>
<p>The size is adjusted if it lies outside the range defined by <a href="qwidget.html#minimumSize-prop">minimumSize</a>() and <a href="qwidget.html#maximumSize-prop">maximumSize</a>().</p>
<p><b>Warning:</b> Calling resize() or <a href="qwidget.html#geometry-prop">setGeometry</a>() inside <a href="qwidget.html#resizeEvent">resizeEvent</a>() can lead to infinite recursion.</p>
<p>Note that setting size to <a href="qsize.html">QSize</a>(0, 0) will cause the widget to not appear on screen. This also applies to windows.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QSize size () const</b></li>
<li><div class="fn"/><b>void resize ( int <i>w</i>, int <i>h</i> )</b></li>
<li><div class="fn"/><b>void resize ( const QSize &amp; )</b></li>
</ul>
<p>See also <a href="qwidget.html#pos-prop">pos</a>, <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, <a href="qwidget.html#maximumSize-prop">maximumSize</a>, and <a href="qwidget.html#resizeEvent">resizeEvent</a>().</p>
<h3 class="fn"><a name="sizeHint-prop"></a>sizeHint : const <a href="qsize.html">QSize</a></h3>
<p>This property holds the recommended size for the widget.</p>
<p>If the value of this property is an invalid size, no size is recommended.</p>
<p>The default implementation of sizeHint() returns an invalid size if there is no layout for this widget, and returns the layout's preferred size otherwise.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>virtual QSize sizeHint () const</b></li>
</ul>
<p>See also <a href="qsize.html#isValid">QSize::isValid</a>(), <a href="qwidget.html#minimumSizeHint-prop">minimumSizeHint</a>(), <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>(), <a href="qwidget.html#minimumSize-prop">setMinimumSize</a>(), and <a href="qwidget.html#updateGeometry">updateGeometry</a>().</p>
<h3 class="fn"><a name="sizeIncrement-prop"></a>sizeIncrement : <a href="qsize.html">QSize</a></h3>
<p>This property holds the size increment of the widget.</p>
<p>When the user resizes the window, the size will move in steps of sizeIncrement().<a href="qwidget.html#width-prop">width</a>() pixels horizontally and sizeIncrement.<a href="qwidget.html#height-prop">height</a>() pixels vertically, with <a href="qwidget.html#baseSize-prop">baseSize</a>() as the basis. Preferred widget sizes are for non-negative integers <i>i</i> and <i>j</i>:</p>
<pre> width = baseSize().width() + i * sizeIncrement().width();
 height = baseSize().height() + j * sizeIncrement().height();</pre>
<p>Note that while you can set the size increment for all widgets, it only affects windows.</p>
<p><b>Warning:</b> The size increment has no effect under Windows, and may be disregarded by the window manager on X.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QSize sizeIncrement () const</b></li>
<li><div class="fn"/><b>void setSizeIncrement ( const QSize &amp; )</b></li>
<li><div class="fn"/><b>void setSizeIncrement ( int <i>w</i>, int <i>h</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#size-prop">size</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, and <a href="qwidget.html#maximumSize-prop">maximumSize</a>.</p>
<h3 class="fn"><a name="sizePolicy-prop"></a>sizePolicy : <a href="qsizepolicy.html">QSizePolicy</a></h3>
<p>This property holds the default layout behavior of the widget.</p>
<p>If there is a <a href="qlayout.html">QLayout</a> that manages this widget's children, the size policy specified by that layout is used. If there is no such <a href="qlayout.html">QLayout</a>, the result of this function is used.</p>
<p>The default policy is Preferred/Preferred, which means that the widget can be freely resized, but prefers to be the size <a href="qwidget.html#sizeHint-prop">sizeHint</a>() returns. Button-like widgets set the size policy to specify that they may stretch horizontally, but are fixed vertically. The same applies to lineedit controls (such as <a href="qlineedit.html">QLineEdit</a>, <a href="qspinbox.html">QSpinBox</a> or an editable <a href="qcombobox.html">QComboBox</a>) and other horizontally orientated widgets (such as <a href="qprogressbar.html">QProgressBar</a>). <a href="qtoolbutton.html">QToolButton</a>'s are normally square, so they allow growth in both directions. Widgets that support different directions (such as <a href="qslider.html">QSlider</a>, <a href="qscrollbar.html">QScrollBar</a> or <a href="porting4.html#qheader">QHeader</a>) specify stretching in the respective direction only. Widgets that can provide scroll bars (usually subclasses of <a href="qscrollarea.html">QScrollArea</a>) tend to specify that they can use additional space, and that they can make do with less than <a href="qwidget.html#sizeHint-prop">sizeHint</a>().</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QSizePolicy sizePolicy () const</b></li>
<li><div class="fn"/><b>void setSizePolicy ( QSizePolicy )</b></li>
<li><div class="fn"/><b>void setSizePolicy ( QSizePolicy::Policy <i>horizontal</i>, QSizePolicy::Policy <i>vertical</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#sizeHint-prop">sizeHint</a>(), <a href="qlayout.html">QLayout</a>, <a href="qsizepolicy.html">QSizePolicy</a>, and <a href="qwidget.html#updateGeometry">updateGeometry</a>().</p>
<h3 class="fn"><a name="statusTip-prop"></a>statusTip : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's status tip.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QString statusTip () const</b></li>
<li><div class="fn"/><b>void setStatusTip ( const QString &amp; )</b></li>
</ul>
<p>See also <a href="qwidget.html#toolTip-prop">toolTip</a> and <a href="qwidget.html#whatsThis-prop">whatsThis</a>.</p>
<h3 class="fn"><a name="styleSheet-prop"></a>styleSheet : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's style sheet.</p>
<p>The style sheet contains a textual description of customizations to the widget's style, as described in the <a href="stylesheet.html">Qt Style Sheets</a> document.</p>
<p><b>Note:</b> Qt style sheets are currently not supported for <a href="qmacstyle.html">QMacStyle</a> (the default style on Mac OS X). We plan to address this in some future release.</p>
<p>This property was introduced in Qt 4.2.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QString styleSheet () const</b></li>
<li><div class="fn"/><b>void setStyleSheet ( const QString &amp; <i>styleSheet</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#setStyle">setStyle</a>(), <a href="qapplication.html#styleSheet-prop">QApplication::styleSheet</a>, and <a href="stylesheet.html">Qt Style Sheets</a>.</p>
<h3 class="fn"><a name="toolTip-prop"></a>toolTip : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's tooltip.</p>
<p>Note that by default tooltips are only shown for widgets that are children of the active window. You can change this behavior by setting the attribute <a href="qt.html#WidgetAttribute-enum">Qt::WA_AlwaysShowToolTips</a> on the <i>window</i>, not on the widget with the tooltip.</p>
<p>If you want to control a tooltip's behavior, you can intercept the <a href="qwidget.html#event">event</a>() function and catch the <a href="qevent.html#Type-enum">QEvent::ToolTip</a> event (e.g&#x2e;, if you want to customize the area for which the tooltip should be shown).</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QString toolTip () const</b></li>
<li><div class="fn"/><b>void setToolTip ( const QString &amp; )</b></li>
</ul>
<p>See also <a href="qtooltip.html">QToolTip</a>, <a href="qwidget.html#statusTip-prop">statusTip</a>, and <a href="qwidget.html#whatsThis-prop">whatsThis</a>.</p>
<h3 class="fn"><a name="updatesEnabled-prop"></a>updatesEnabled : bool</h3>
<p>This property holds whether updates are enabled.</p>
<p>An updates enabled widget receives paint events and has a system background; a disabled widget does not. This also implies that calling <a href="qwidget.html#update">update</a>() and <a href="qwidget.html#repaint">repaint</a>() has no effect if updates are disabled.</p>
<p>setUpdatesEnabled() is normally used to disable updates for a short period of time, for instance to avoid screen flicker during large changes. In Qt, widgets normally do not generate screen flicker, but on X11 the server might erase regions on the screen when widgets get hidden before they can be replaced by other widgets. Disabling updates solves this.</p>
<p>Example:</p>
<pre> setUpdatesEnabled(false);
 bigVisualChanges();
 setUpdatesEnabled(true);</pre>
<p>Disabling a widget implicitly disables all its children. Enabling respectively enables all child widgets unless they have been explicitly disabled. Re-enabling updates implicitly calls <a href="qwidget.html#update">update</a>() on the widget.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool updatesEnabled () const</b></li>
<li><div class="fn"/><b>void setUpdatesEnabled ( bool <i>enable</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#paintEvent">paintEvent</a>().</p>
<h3 class="fn"><a name="visible-prop"></a>visible : bool</h3>
<p>This property holds whether the widget is visible.</p>
<p>Calling setVisible(true) or <a href="qwidget.html#show">show</a>() sets the widget to visible status if all its parent widgets up to the window are visible. If an ancestor is not visible, the widget won't become visible until all its ancestors are shown. If its size or position has changed, Qt guarantees that a widget gets move and resize events just before it is shown. If the widget has not been resized yet, Qt will adjust the widget's size to a useful default using <a href="qwidget.html#adjustSize">adjustSize</a>().</p>
<p>Calling setVisible(false) or <a href="qwidget.html#hide">hide</a>() hides a widget explicitly. An explicitly hidden widget will never become visible, even if all its ancestors become visible, unless you show it.</p>
<p>A widget receives show and hide events when its visibility status changes. Between a hide and a show event, there is no need to waste CPU cycles preparing or displaying information to the user. A video application, for example, might simply stop generating new frames.</p>
<p>A widget that happens to be obscured by other windows on the screen is considered to be visible. The same applies to iconified windows and windows that exist on another virtual desktop (on platforms that support this concept). A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g&#x2e; a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again.</p>
<p>You almost never have to reimplement the setVisible() function. If you need to change some settings before a widget is shown, use <a href="qwidget.html#showEvent">showEvent</a>() instead. If you need to do some delayed initialization use the Polish event delivered to the <a href="qwidget.html#event">event</a>() function.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool isVisible () const</b></li>
<li><div class="fn"/><b>virtual void setVisible ( bool <i>visible</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#isHidden">isHidden</a>(), <a href="qwidget.html#isVisibleTo">isVisibleTo</a>(), <a href="qwidget.html#minimized-prop">isMinimized</a>(), <a href="qwidget.html#showEvent">showEvent</a>(), and <a href="qwidget.html#hideEvent">hideEvent</a>().</p>
<h3 class="fn"><a name="whatsThis-prop"></a>whatsThis : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's What's This help text.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QString whatsThis () const</b></li>
<li><div class="fn"/><b>void setWhatsThis ( const QString &amp; )</b></li>
</ul>
<p>See also <a href="qwhatsthis.html">QWhatsThis</a>, <a href="qwidget.html#toolTip-prop">QWidget::toolTip</a>, and <a href="qwidget.html#statusTip-prop">QWidget::statusTip</a>.</p>
<h3 class="fn"><a name="width-prop"></a>width : const int</h3>
<p>This property holds the width of the widget excluding any window frame.</p>
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int width () const</b></li>
</ul>
<p>See also <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#height-prop">height</a>, and <a href="qwidget.html#size-prop">size</a>.</p>
<h3 class="fn"><a name="windowFlags-prop"></a>windowFlags : <a href="qt.html#WindowType-enum">Qt::WindowFlags</a></h3>
<p>Window flags are a combination of a type (e.g&#x2e; <a href="qt.html#WindowType-enum">Qt::Dialog</a>) and zero or more hints to the window system (e.g&#x2e; <a href="qt.html#WindowType-enum">Qt::FramelessWindowHint</a>).</p>
<p>If the widget had type <a href="qt.html#WindowType-enum">Qt::Widget</a> or <a href="qt.html#WindowType-enum">Qt::SubWindow</a> and becomes a window (<a href="qt.html#WindowType-enum">Qt::Window</a>, <a href="qt.html#WindowType-enum">Qt::Dialog</a>, etc.), it is put at position (0, 0) on the desktop. If the widget is a window and becomes a <a href="qt.html#WindowType-enum">Qt::Widget</a> or <a href="qt.html#WindowType-enum">Qt::SubWindow</a>, it is put at position (0, 0) relative to its parent widget.</p>
<p><b>Note:</b> This function calls <a href="qwidget.html#setParent">setParent</a>() when changing the flags for a window, and the side effects documented in <a href="qwidget.html#setParent">setParent</a>() also apply.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>Qt::WindowFlags windowFlags () const</b></li>
<li><div class="fn"/><b>void setWindowFlags ( Qt::WindowFlags <i>type</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#windowType">windowType</a>() and <a href="widgets-windowflags.html">Window Flags Example</a>.</p>
<h3 class="fn"><a name="windowIcon-prop"></a>windowIcon : <a href="qicon.html">QIcon</a></h3>
<p>This property holds the widget's icon.</p>
<p>This property only makes sense for windows. If no icon has been set, windowIcon() returns the application icon (<a href="qapplication.html#windowIcon-prop">QApplication::windowIcon</a>()).</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QIcon windowIcon () const</b></li>
<li><div class="fn"/><b>void setWindowIcon ( const QIcon &amp; <i>icon</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#windowIconText-prop">windowIconText</a> and <a href="qwidget.html#windowTitle-prop">windowTitle</a>.</p>
<h3 class="fn"><a name="windowIconText-prop"></a>windowIconText : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's icon text.</p>
<p>This property only makes sense for windows. If no icon text has been set, this functions returns an empty string.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QString windowIconText () const</b></li>
<li><div class="fn"/><b>void setWindowIconText ( const QString &amp; )</b></li>
</ul>
<p>See also <a href="qwidget.html#windowIcon-prop">windowIcon</a> and <a href="qwidget.html#windowTitle-prop">windowTitle</a>.</p>
<h3 class="fn"><a name="windowModality-prop"></a>windowModality : <a href="qt.html#WindowModality-enum">Qt::WindowModality</a></h3>
<p>This property holds which windows are blocked by the modal widget.</p>
<p>This property only makes sense for windows. A modal widget prevents widgets in other windows from getting input. The value of this property controls which windows are blocked when the widget is visible. Changing this property while the window is visible has no effect; you must <a href="qwidget.html#hide">hide</a>() the widget first, then <a href="qwidget.html#show">show</a>() it again.</p>
<p>By default, this property is <a href="qt.html#WindowModality-enum">Qt::NonModal</a>.</p>
<p>This property was introduced in Qt 4.1.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>Qt::WindowModality windowModality () const</b></li>
<li><div class="fn"/><b>void setWindowModality ( Qt::WindowModality <i>windowModality</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#isWindow">isWindow</a>(), <a href="qwidget.html#modal-prop">QWidget::modal</a>, and <a href="qdialog.html">QDialog</a>.</p>
<h3 class="fn"><a name="windowModified-prop"></a>windowModified : bool</h3>
<p>This property holds whether the document shown in the window has unsaved changes.</p>
<p>A modified window is a window whose content has changed but has not been saved to disk. This flag will have different effects varied by the platform. On Mac OS X the close button will have a modified look; on other platforms, the window title will have an '*' (asterisk).</p>
<p>The window title must contain a &quot;[*]&quot; placeholder, which indicates where the '*' should appear. Normally, it should appear right after the file name (e.g&#x2e;, &quot;document1.txt[*] - Text Editor&quot;). If the window isn't modified, the placeholder is simply removed.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>bool isWindowModified () const</b></li>
<li><div class="fn"/><b>void setWindowModified ( bool )</b></li>
</ul>
<p>See also <a href="qwidget.html#windowTitle-prop">windowTitle</a>, <a href="mainwindows-application.html">Application Example</a>, <a href="mainwindows-sdi.html">SDI Example</a>, and <a href="mainwindows-mdi.html">MDI Example</a>.</p>
<h3 class="fn"><a name="windowOpacity-prop"></a>windowOpacity : double</h3>
<p>This property holds the level of opacity for the window.</p>
<p>The valid range of opacity is from 1.0 (completely opaque) to 0.0 (completely transparent).</p>
<p>By default the value of this property is 1.0&#x2e;</p>
<p>This feature is available on Mac OS X, X11 platforms that support the Composite extension, and Windows 2000 and later.</p>
<p>Note that under X11 you need to have a composite manager running, and the X11 specific _NET_WM_WINDOW_OPACITY atom needs to be supported by the window manager you are using.</p>
<p><b>Warning:</b> Changing this property from opaque to transparent might issue a paint event that needs to be processed before the window is displayed correctly. This affects mainly the use of <a href="qpixmap.html#grabWindow">QPixmap::grabWindow</a>(). Also note that semi-transparent windows update and resize significantly slower than opaque windows.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>qreal windowOpacity () const</b></li>
<li><div class="fn"/><b>void setWindowOpacity ( qreal <i>level</i> )</b></li>
</ul>
<p>See also <a href="qwidget.html#setMask">setMask</a>().</p>
<h3 class="fn"><a name="windowTitle-prop"></a>windowTitle : <a href="qstring.html">QString</a></h3>
<p>This property holds the window title (caption).</p>
<p>This property only makes sense for windows. If no caption has been set, the title is an empty string.</p>
<p>If you use the <a href="qwidget.html#windowModified-prop">windowModified</a> mechanism, the window title must contain a &quot;[*]&quot; placeholder, which indicates where the '*' should appear. Normally, it should appear right after the file name (e.g&#x2e;, &quot;document1.txt[*] - Text Editor&quot;). If the <a href="qwidget.html#windowModified-prop">windowModified</a> property is false (the default), the placeholder is simply removed.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>QString windowTitle () const</b></li>
<li><div class="fn"/><b>void setWindowTitle ( const QString &amp; )</b></li>
</ul>
<p>See also <a href="qwidget.html#windowIcon-prop">windowIcon</a>, <a href="qwidget.html#windowIconText-prop">windowIconText</a>, and <a href="qwidget.html#windowModified-prop">windowModified</a>.</p>
<h3 class="fn"><a name="x-prop"></a>x : const int</h3>
<p>This property holds the x coordinate of the widget relative to its parent including any window frame.</p>
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int x () const</b></li>
</ul>
<p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#y-prop">y</a>, and <a href="qwidget.html#pos-prop">pos</a>.</p>
<h3 class="fn"><a name="y-prop"></a>y : const int</h3>
<p>This property holds the y coordinate of the widget relative to its parent and including any window frame.</p>
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int y () const</b></li>
</ul>
<p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#x-prop">x</a>, and <a href="qwidget.html#pos-prop">pos</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QWidget"></a>QWidget::QWidget ( QWidget * <i>parent</i> = 0, <a href="qt.html#WindowType-enum">Qt::WindowFlags</a> <i>f</i> = 0 )</h3>
<p>Constructs a widget which is a child of <i>parent</i>, with widget flags set to <i>f</i>.</p>
<p>If <i>parent</i> is 0, the new widget becomes a window. If <i>parent</i> is another widget, this widget becomes a child window inside <i>parent</i>. The new widget is deleted when its <i>parent</i> is deleted.</p>
<p>The widget flags argument, <i>f</i>, is normally 0, but it can be set to customize the frame of a window (i.e&#x2e; <i>parent</i> must be 0). To customize the frame, use a value composed from the bitwise OR of any of the <a href="qt.html#WindowType-enum">window flags</a>.</p>
<p>If you add a child widget to an already visible widget you must explicitly show the child to make it visible.</p>
<p>Note that the X11 version of Qt may not be able to deliver all combinations of style flags on all systems. This is because on X11, Qt can only ask the window manager, and the window manager can override the application's settings. On Windows, Qt can set whatever flags you want.</p>
<p>See also <a href="qwidget.html#windowFlags-prop">windowFlags</a>.</p>
<h3 class="fn"><a name="dtor.QWidget"></a>QWidget::~QWidget ()</h3>
<p>Destroys the widget.</p>
<p>All this widget's children are deleted first. The application exits if this widget is the main widget.</p>
<h3 class="fn"><a name="actionEvent"></a>void QWidget::actionEvent ( <a href="qactionevent.html">QActionEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler is called with the given <i>event</i> whenever the widget's actions are changed.</p>
<p>See also <a href="qwidget.html#addAction">addAction</a>(), <a href="qwidget.html#insertAction">insertAction</a>(), <a href="qwidget.html#removeAction">removeAction</a>(), <a href="qwidget.html#actions">actions</a>(), and <a href="qactionevent.html">QActionEvent</a>.</p>
<h3 class="fn"><a name="actions"></a><a href="qlist.html">QList</a>&lt;<a href="qaction.html">QAction</a> *&gt; QWidget::actions () const</h3>
<p>Returns the (possibly empty) list of this widget's actions.</p>
<p>See also <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a>, <a href="qwidget.html#insertAction">insertAction</a>(), and <a href="qwidget.html#removeAction">removeAction</a>().</p>
<h3 class="fn"><a name="activateWindow"></a>void QWidget::activateWindow ()</h3>
<p>Sets the top-level widget containing this widget to be the active window.</p>
<p>An active window is a visible top-level window that has the keyboard input focus.</p>
<p>This function performs the same operation as clicking the mouse on the title bar of a top-level window. On X11, the result depends on the Window Manager. If you want to ensure that the window is stacked on top as well you should also call <a href="qwidget.html#raise">raise</a>(). Note that the window must be visible, otherwise activateWindow() has no effect.</p>
<p>On Windows, if you are calling this when the application is not currently the active one then it will not make it the active window. It will change the color of the taskbar entry to indicate that the window has changed in some way. This is because Microsoft do not allow an application to interrupt what the user is currently doing in another application.</p>
<p>See also <a href="qwidget.html#isActiveWindow-prop">isActiveWindow</a>(), <a href="qwidget.html#window">window</a>(), and <a href="qwidget.html#show">show</a>().</p>
<h3 class="fn"><a name="addAction"></a>void QWidget::addAction ( <a href="qaction.html">QAction</a> * <i>action</i> )</h3>
<p>Appends the action <i>action</i> to this widget's list of actions.</p>
<p>All QWidgets have a list of <a href="qaction.html">QAction</a>s, however they can be represented graphically in many different ways. The default use of the <a href="qaction.html">QAction</a> list (as returned by <a href="qwidget.html#actions">actions</a>()) is to create a context <a href="qmenu.html">QMenu</a>.</p>
<p>A <a href="qwidget.html">QWidget</a> should only have one of each action.</p>
<p>See also <a href="qwidget.html#removeAction">removeAction</a>(), <a href="qwidget.html#insertAction">insertAction</a>(), <a href="qwidget.html#actions">actions</a>(), and <a href="qmenu.html">QMenu</a>.</p>
<h3 class="fn"><a name="addActions"></a>void QWidget::addActions ( <a href="qlist.html">QList</a>&lt;<a href="qaction.html">QAction</a> *&gt; <i>actions</i> )</h3>
<p>Appends the actions <i>actions</i> to this widget's list of actions.</p>
<p>See also <a href="qwidget.html#removeAction">removeAction</a>(), <a href="qmenu.html">QMenu</a>, and <a href="qwidget.html#addAction">addAction</a>().</p>
<h3 class="fn"><a name="adjustSize"></a>void QWidget::adjustSize ()</h3>
<p>Adjusts the size of the widget to fit the contents.</p>
<p>Uses <a href="qwidget.html#sizeHint-prop">sizeHint</a>() if valid (i.e if the size hint's width and height are &gt;= 0); otherwise sets the size to the children rectangle that covers all child widgets (the union of all child widget rectangles). For top-level widgets, the screen size is also taken into account.</p>
<p>See also <a href="qwidget.html#sizeHint-prop">sizeHint</a>() and <a href="qwidget.html#childrenRect-prop">childrenRect</a>().</p>
<h3 class="fn"><a name="backgroundRole"></a><a href="qpalette.html#ColorRole-enum">QPalette::ColorRole</a> QWidget::backgroundRole () const</h3>
<p>Returns the background role of the widget.</p>
<p>The background role defines the brush from the widget's <a href="qwidget.html#palette-prop">palette</a> that is used to render the background.</p>
<p>If no explicit background role is set, the widget inherts its parent widget's background role.</p>
<p>See also <a href="qwidget.html#setBackgroundRole">setBackgroundRole</a>() and <a href="qwidget.html#foregroundRole">foregroundRole</a>().</p>
<h3 class="fn"><a name="changeEvent"></a>void QWidget::changeEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented to handle state changes.</p>
<p>The state being changed in this event can be retrieved through event <i>event</i>.</p>
<p>Change events include: <a href="qevent.html#Type-enum">QEvent::ToolBarChange</a>, <a href="qevent.html#Type-enum">QEvent::ActivationChange</a>, <a href="qevent.html#Type-enum">QEvent::EnabledChange</a>, <a href="qevent.html#Type-enum">QEvent::FontChange</a>, <a href="qevent.html#Type-enum">QEvent::StyleChange</a>, <a href="qevent.html#Type-enum">QEvent::PaletteChange</a>, <a href="qevent.html#Type-enum">QEvent::WindowTitleChange</a>, <a href="qevent.html#Type-enum">QEvent::IconTextChange</a>, <a href="qevent.html#Type-enum">QEvent::ModifiedChange</a>, <a href="qevent.html#Type-enum">QEvent::MouseTrackingChange</a>, <a href="qevent.html#Type-enum">QEvent::ParentChange</a>, <a href="qevent.html#Type-enum">QEvent::WindowStateChange</a>, <a href="qevent.html#Type-enum">QEvent::LanguageChange</a>, <a href="qevent.html#Type-enum">QEvent::LocaleChange</a>, <a href="qevent.html#Type-enum">QEvent::LayoutDirectionChange</a>.</p>
<h3 class="fn"><a name="childAt"></a>QWidget * QWidget::childAt ( int <i>x</i>, int <i>y</i> ) const</h3>
<p>Returns the visible child widget at the position (<i>x</i>, <i>y</i>) in the widget's coordinate system. If there is no visible child widget at the specified position, the function returns 0.</p>
<h3 class="fn"><a name="childAt-4"></a>QWidget * QWidget::childAt ( const <a href="qpoint.html">QPoint</a> &amp; <i>p</i> ) const</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Returns the visible child widget at point <i>p</i> in the widget's own coordinate system.</p>
<h3 class="fn"><a name="clearFocus"></a>void QWidget::clearFocus ()</h3>
<p>Takes keyboard input focus from the widget.</p>
<p>If the widget has active focus, a <a href="qwidget.html#focusOutEvent">focus out event</a> is sent to this widget to tell it that it is about to lose the focus.</p>
<p>This widget must enable focus setting in order to get the keyboard input focus, i.e&#x2e; it must call <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>().</p>
<p>See also <a href="qwidget.html#focus-prop">hasFocus</a>(), <a href="qwidget.html#setFocus">setFocus</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), and <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>().</p>
<h3 class="fn"><a name="clearMask"></a>void QWidget::clearMask ()</h3>
<p>Removes any mask set by <a href="qwidget.html#setMask">setMask</a>().</p>
<p>See also <a href="qwidget.html#setMask">setMask</a>().</p>
<h3 class="fn"><a name="close"></a>bool QWidget::close ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Closes this widget. Returns true if the widget was closed; otherwise returns false.</p>
<p>First it sends the widget a <a href="qcloseevent.html">QCloseEvent</a>. The widget is <a href="qwidget.html#hide">hidden</a> if it <a href="qevent.html#accept">accepts</a> the close event. If it <a href="qevent.html#ignore">ignores</a> the event, nothing happens. The default implementation of <a href="qwidget.html#closeEvent">QWidget::closeEvent</a>() accepts the close event.</p>
<p>If the widget has the <a href="qt.html#WidgetAttribute-enum">Qt::WA_DeleteOnClose</a> flag, the widget is also deleted. A close events is delivered to the widget no matter if the widget is visible or not.</p>
<p>The <a href="qapplication.html#lastWindowClosed">QApplication::lastWindowClosed</a>() signal is emitted when the last visible primary window (i.e&#x2e; window with no parent) with the <a href="qt.html#WidgetAttribute-enum">Qt::WA_QuitOnClose</a> attribute set is closed. By default this attribute is set for all widgets except transient windows such as splash screens, tool windows, and popup menus.</p>
<h3 class="fn"><a name="closeEvent"></a>void QWidget::closeEvent ( <a href="qcloseevent.html">QCloseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive widget close events.</p>
<p>See also <a href="qwidget.html#event">event</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#close">close</a>(), <a href="qcloseevent.html">QCloseEvent</a>, and <a href="mainwindows-application.html">Application Example</a>.</p>
<h3 class="fn"><a name="contentsRect"></a><a href="qrect.html">QRect</a> QWidget::contentsRect () const</h3>
<p>Returns the area inside the widget's margins.</p>
<p>See also <a href="qwidget.html#setContentsMargins">setContentsMargins</a>() and <a href="qwidget.html#getContentsMargins">getContentsMargins</a>().</p>
<h3 class="fn"><a name="contextMenuEvent"></a>void QWidget::contextMenuEvent ( <a href="qcontextmenuevent.html">QContextMenuEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive widget context menu events.</p>
<p>The handler is called when the widget's <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a> is <a href="qt.html#ContextMenuPolicy-enum">Qt::DefaultContextMenu</a>.</p>
<p>The default implementation ignores the context event. See the <a href="qcontextmenuevent.html">QContextMenuEvent</a> documentation for more details.</p>
<p>See also <a href="qwidget.html#event">event</a>(), <a href="qcontextmenuevent.html">QContextMenuEvent</a>, and <a href="qwidget.html#customContextMenuRequested">customContextMenuRequested</a>().</p>
<h3 class="fn"><a name="create"></a>void QWidget::create ( <a href="qwidget.html#WId-typedef">WId</a> <i>window</i> = 0, bool <i>initializeWindow</i> = true, bool <i>destroyOldWindow</i> = true )&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Creates a new widget window if <i>window</i> is 0, otherwise sets the widget's window to <i>window</i>.</p>
<p>Initializes the window (sets the geometry etc.) if <i>initializeWindow</i> is true. If <i>initializeWindow</i> is false, no initialization is performed. This parameter only makes sense if <i>window</i> is a valid window.</p>
<p>Destroys the old window if <i>destroyOldWindow</i> is true. If <i>destroyOldWindow</i> is false, you are responsible for destroying the window yourself (using platform native code).</p>
<p>The <a href="qwidget.html">QWidget</a> constructor calls create(0,true,true) to create a window for this widget.</p>
<h3 class="fn"><a name="customContextMenuRequested"></a>void QWidget::customContextMenuRequested ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the widget's <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a> is <a href="qt.html#ContextMenuPolicy-enum">Qt::CustomContextMenu</a>, and the user has requested a context menu on the widget. The position <i>pos</i> is the position of the context menu event that the widget receives. Normally this is in widget coordinates. The exception to this rule is <a href="qabstractscrollarea.html">QAbstractScrollArea</a> and its subclasses that map the context menu event to coordinates of the <a href="qabstractscrollarea.html#viewport">viewport()</a> .</p>
<p>See also <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), <a href="qmenu.html">QMenu</a>, and <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a>.</p>
<h3 class="fn"><a name="destroy"></a>void QWidget::destroy ( bool <i>destroyWindow</i> = true, bool <i>destroySubWindows</i> = true )&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Frees up window system resources. Destroys the widget window if <i>destroyWindow</i> is true.</p>
<p>destroy() calls itself recursively for all the child widgets, passing <i>destroySubWindows</i> for the <i>destroyWindow</i> parameter. To have more control over destruction of subwidgets, destroy subwidgets selectively first.</p>
<p>This function is usually called from the <a href="qwidget.html">QWidget</a> destructor.</p>
<h3 class="fn"><a name="dragEnterEvent"></a>void QWidget::dragEnterEvent ( <a href="qdragenterevent.html">QDragEnterEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler is called when a drag is in progress and the mouse enters this widget. The event is passed in the <i>event</i> parameter.</p>
<p>If the event is ignored, the widget won't receive any <a href="qwidget.html#dragMoveEvent">drag move events</a>.</p>
<p>See the <a href="dnd.html">Drag-and-drop documentation</a> for an overview of how to provide drag-and-drop in your application.</p>
<p>See also <a href="qdrag.html">QDrag</a> and <a href="qdragenterevent.html">QDragEnterEvent</a>.</p>
<h3 class="fn"><a name="dragLeaveEvent"></a>void QWidget::dragLeaveEvent ( <a href="qdragleaveevent.html">QDragLeaveEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler is called when a drag is in progress and the mouse leaves this widget. The event is passed in the <i>event</i> parameter.</p>
<p>See the <a href="dnd.html">Drag-and-drop documentation</a> for an overview of how to provide drag-and-drop in your application.</p>
<p>See also <a href="qdrag.html">QDrag</a> and <a href="qdragleaveevent.html">QDragLeaveEvent</a>.</p>
<h3 class="fn"><a name="dragMoveEvent"></a>void QWidget::dragMoveEvent ( <a href="qdragmoveevent.html">QDragMoveEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler is called if a drag is in progress, and when any of the following conditions occur: the cursor enters this widget, the cursor moves within this widget, or a modifier key is pressed on the keyboard while this widget has the focus. The event is passed in the <i>event</i> parameter.</p>
<p>See the <a href="dnd.html">Drag-and-drop documentation</a> for an overview of how to provide drag-and-drop in your application.</p>
<p>See also <a href="qdrag.html">QDrag</a> and <a href="qdragmoveevent.html">QDragMoveEvent</a>.</p>
<h3 class="fn"><a name="dropEvent"></a>void QWidget::dropEvent ( <a href="qdropevent.html">QDropEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler is called when the drag is dropped on this widget. The event is passed in the <i>event</i> parameter.</p>
<p>See the <a href="dnd.html">Drag-and-drop documentation</a> for an overview of how to provide drag-and-drop in your application.</p>
<p>See also <a href="qdrag.html">QDrag</a> and <a href="qdropevent.html">QDropEvent</a>.</p>
<h3 class="fn"><a name="ensurePolished"></a>void QWidget::ensurePolished () const</h3>
<p>Ensures that the widget has been polished by <a href="qstyle.html">QStyle</a> (i.e&#x2e;, has a proper font and palette).</p>
<p><a href="qwidget.html">QWidget</a> calls this function after it has been fully constructed but before it is shown the very first time. You can call this function if you want to ensure that the widget is polished before doing an operation, e.g&#x2e;, the correct font size might be needed in the widget's <a href="qwidget.html#sizeHint-prop">sizeHint</a>() reimplementation. Note that this function <i>is</i> called from the default implementation of <a href="qwidget.html#sizeHint-prop">sizeHint</a>().</p>
<p>Polishing is useful for final initialization that must happen after all constructors (from base classes as well as from subclasses) have been called.</p>
<p>If you need to change some settings when a widget is polished, reimplement <a href="qwidget.html#event">event</a>() and handle the <a href="qevent.html#Type-enum">QEvent::Polish</a> event type.</p>
<p><b>Note:</b> The function is declared const so that it can be called from other const functions (e.g&#x2e;, <a href="qwidget.html#sizeHint-prop">sizeHint</a>()).</p>
<p>See also <a href="qwidget.html#event">event</a>().</p>
<h3 class="fn"><a name="enterEvent"></a>void QWidget::enterEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive widget enter events which are passed in the <i>event</i> parameter.</p>
<p>An event is sent to the widget when the mouse cursor enters the widget.</p>
<p>See also <a href="qwidget.html#leaveEvent">leaveEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), and <a href="qwidget.html#event">event</a>().</p>
<h3 class="fn"><a name="event"></a>bool QWidget::event ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This is the main event handler; it handles event <i>event</i>. You can reimplement this function in a subclass, but we recommend using one of the specialized event handlers instead.</p>
<p>Key press and release events are treated differently from other events. event() checks for Tab and Shift+Tab and tries to move the focus appropriately. If there is no widget to move the focus to (or the key press is not Tab or Shift+Tab), event() calls <a href="qwidget.html#keyPressEvent">keyPressEvent</a>().</p>
<p>Mouse and tablet event handling is also slightly special: only when the widget is <a href="qwidget.html#enabled-prop">enabled</a>, event() will call the specialized handlers such as <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(); otherwise it will discard the event.</p>
<p>This function returns true if the event was recognized, otherwise it returns false. If the recognized event was accepted (see <a href="qevent.html#accepted-prop">QEvent::accepted</a>), any further processing such as event propagation to the parent widget stops.</p>
<p>Reimplemented from <a href="qobject.html#event">QObject</a>.</p>
<p>See also <a href="qwidget.html#closeEvent">closeEvent</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#enterEvent">enterEvent</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qwidget.html#leaveEvent">leaveEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#moveEvent">moveEvent</a>(), <a href="qwidget.html#paintEvent">paintEvent</a>(), <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qobject.html#event">QObject::event</a>(), and <a href="qobject.html#timerEvent">QObject::timerEvent</a>().</p>
<h3 class="fn"><a name="find"></a>QWidget * QWidget::find ( <a href="qwidget.html#WId-typedef">WId</a> <i>id</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns a pointer to the widget with window identifer/handle <i>id</i>.</p>
<p>The window identifier type depends on the underlying window system, see <tt>qwindowdefs.h</tt> for the actual definition. If there is no widget with this identifier, 0 is returned.</p>
<h3 class="fn"><a name="focusInEvent"></a>void QWidget::focusInEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive keyboard focus events (focus received) for the widget. The event is passed in the <i>event</i> parameter</p>
<p>A widget normally must <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>() to something other than <a href="qt.html#FocusPolicy-enum">Qt::NoFocus</a> in order to receive focus events. (Note that the application programmer can call <a href="qwidget.html#setFocus">setFocus</a>() on any widget, even those that do not normally accept focus.)</p>
<p>The default implementation updates the widget (except for windows that do not specify a <a href="qwidget.html#focusPolicy-prop">focusPolicy</a>()).</p>
<p>See also <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qfocusevent.html">QFocusEvent</a>.</p>
<h3 class="fn"><a name="focusNextChild"></a>bool QWidget::focusNextChild ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Finds a new widget to give the keyboard focus to, as appropriate for <b>Tab</b>, and returns true if it can find a new widget, or false if it can't.</p>
<p>See also <a href="qwidget.html#focusPreviousChild">focusPreviousChild</a>().</p>
<h3 class="fn"><a name="focusNextPrevChild"></a>bool QWidget::focusNextPrevChild ( bool <i>next</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Finds a new widget to give the keyboard focus to, as appropriate for Tab and Shift+Tab, and returns true if it can find a new widget, or false if it can't.</p>
<p>If <i>next</i> is true, this function searches forward, if <i>next</i> is false, it searches backward.</p>
<p>Sometimes, you will want to reimplement this function. For example, a web browser might reimplement it to move its &quot;current active link&quot; forward or backward, and call focusNextPrevChild() only when it reaches the last or first link on the &quot;page&quot;.</p>
<p>Child widgets call focusNextPrevChild() on their parent widgets, but only the window that contains the child widgets decides where to redirect focus. By reimplementing this function for an object, you thus gain control of focus traversal for all child widgets.</p>
<p>See also <a href="qwidget.html#focusNextChild">focusNextChild</a>() and <a href="qwidget.html#focusPreviousChild">focusPreviousChild</a>().</p>
<h3 class="fn"><a name="focusOutEvent"></a>void QWidget::focusOutEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive keyboard focus events (focus lost) for the widget. The events is passed in the <i>event</i> parameter.</p>
<p>A widget normally must <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>() to something other than <a href="qt.html#FocusPolicy-enum">Qt::NoFocus</a> in order to receive focus events. (Note that the application programmer can call <a href="qwidget.html#setFocus">setFocus</a>() on any widget, even those that do not normally accept focus.)</p>
<p>The default implementation updates the widget (except for windows that do not specify a <a href="qwidget.html#focusPolicy-prop">focusPolicy</a>()).</p>
<p>See also <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qfocusevent.html">QFocusEvent</a>.</p>
<h3 class="fn"><a name="focusPreviousChild"></a>bool QWidget::focusPreviousChild ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Finds a new widget to give the keyboard focus to, as appropriate for <b>Shift+Tab</b>, and returns true if it can find a new widget, or false if it can't.</p>
<p>See also <a href="qwidget.html#focusNextChild">focusNextChild</a>().</p>
<h3 class="fn"><a name="focusProxy"></a>QWidget * QWidget::focusProxy () const</h3>
<p>Returns the focus proxy, or 0 if there is no focus proxy.</p>
<p>See also <a href="qwidget.html#setFocusProxy">setFocusProxy</a>().</p>
<h3 class="fn"><a name="focusWidget"></a>QWidget * QWidget::focusWidget () const</h3>
<p>Returns the last child of this widget that setFocus had been called on. For top level widgets this is the widget that will get focus in case this window gets activated</p>
<p>This is not the same as <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>(), which returns the focus widget in the currently active window.</p>
<h3 class="fn"><a name="fontInfo"></a><a href="qfontinfo.html">QFontInfo</a> QWidget::fontInfo () const</h3>
<p>Returns the font info for the widget's current font. Equivalent to QFontInto(widget-&gt;<a href="qwidget.html#font-prop">font</a>()).</p>
<p>See also <a href="qwidget.html#font-prop">font</a>(), <a href="qwidget.html#fontMetrics">fontMetrics</a>(), and <a href="qwidget.html#font-prop">setFont</a>().</p>
<h3 class="fn"><a name="fontMetrics"></a><a href="qfontmetrics.html">QFontMetrics</a> QWidget::fontMetrics () const</h3>
<p>Returns the font metrics for the widget's current font. Equivalent to <a href="qfontmetrics.html">QFontMetrics</a>(widget-&gt;<a href="qwidget.html#font-prop">font</a>()).</p>
<p>See also <a href="qwidget.html#font-prop">font</a>(), <a href="qwidget.html#fontInfo">fontInfo</a>(), and <a href="qwidget.html#font-prop">setFont</a>().</p>
<h3 class="fn"><a name="foregroundRole"></a><a href="qpalette.html#ColorRole-enum">QPalette::ColorRole</a> QWidget::foregroundRole () const</h3>
<p>Returns the foreground role.</p>
<p>The foreground role defines the color from the widget's <a href="qwidget.html#palette-prop">palette</a> that is used to draw the foreground.</p>
<p>If no explicit foreground role is set, the function returns a role that contrasts with the background role.</p>
<p>See also <a href="qwidget.html#setForegroundRole">setForegroundRole</a>() and <a href="qwidget.html#backgroundRole">backgroundRole</a>().</p>
<h3 class="fn"><a name="getContentsMargins"></a>void QWidget::getContentsMargins ( int * <i>left</i>, int * <i>top</i>, int * <i>right</i>, int * <i>bottom</i> ) const</h3>
<p>Returns the widget's contents margins for <i>left</i>, <i>top</i>, <i>right</i>, and <i>bottom</i>.</p>
<p>See also <a href="qwidget.html#setContentsMargins">setContentsMargins</a>() and <a href="qwidget.html#contentsRect">contentsRect</a>().</p>
<h3 class="fn"><a name="getDC"></a>HDC QWidget::getDC () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the window system handle of the widget, for low-level access. Using this function is not portable.</p>
<p>An HDC acquired with getDC() has to be released with <a href="qwidget.html#releaseDC">releaseDC</a>().</p>
<p><b>Warning:</b> Using this function is not portable.</p>
<h3 class="fn"><a name="grabKeyboard"></a>void QWidget::grabKeyboard ()</h3>
<p>Grabs the keyboard input.</p>
<p>This widget receives all keyboard events until <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>() is called; other widgets get no keyboard events at all. Mouse events are not affected. Use <a href="qwidget.html#grabMouse">grabMouse</a>() if you want to grab that.</p>
<p>The focus widget is not affected, except that it doesn't receive any keyboard events. <a href="qwidget.html#setFocus">setFocus</a>() moves the focus as usual, but the new focus widget receives keyboard events only after <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>() is called.</p>
<p>If a different widget is currently grabbing keyboard input, that widget's grab is released first.</p>
<p>See also <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>(), <a href="qwidget.html#grabMouse">grabMouse</a>(), <a href="qwidget.html#releaseMouse">releaseMouse</a>(), and <a href="qwidget.html#focusWidget">focusWidget</a>().</p>
<h3 class="fn"><a name="grabMouse"></a>void QWidget::grabMouse ()</h3>
<p>Grabs the mouse input.</p>
<p>This widget receives all mouse events until <a href="qwidget.html#releaseMouse">releaseMouse</a>() is called; other widgets get no mouse events at all. Keyboard events are not affected. Use <a href="qwidget.html#grabKeyboard">grabKeyboard</a>() if you want to grab that.</p>
<p><b>Warning:</b> Bugs in mouse-grabbing applications very often lock the terminal. Use this function with extreme caution, and consider using the <tt>-nograb</tt> command line option while debugging.</p>
<p>It is almost never necessary to grab the mouse when using Qt, as Qt grabs and releases it sensibly. In particular, Qt grabs the mouse when a mouse button is pressed and keeps it until the last button is released.</p>
<p>Note that only visible widgets can grab mouse input. If <a href="qwidget.html#visible-prop">isVisible</a>() returns false for a widget, that widget cannot call grabMouse().</p>
<p><a href="qwidget.html#focusWidget">focusWidget</a>()</p>
<p>See also <a href="qwidget.html#releaseMouse">releaseMouse</a>(), <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>(), and <a href="qwidget.html#grabKeyboard">grabKeyboard</a>().</p>
<h3 class="fn"><a name="grabMouse-2"></a>void QWidget::grabMouse ( const <a href="qcursor.html">QCursor</a> &amp; <i>cursor</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Grabs the mouse input and changes the cursor shape.</p>
<p>The cursor will assume shape <i>cursor</i> (for as long as the mouse focus is grabbed) and this widget will be the only one to receive mouse events until <a href="qwidget.html#releaseMouse">releaseMouse</a>() is called().</p>
<p><b>Warning:</b> Grabbing the mouse might lock the terminal.</p>
<p>See also <a href="qwidget.html#releaseMouse">releaseMouse</a>(), <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>(), and <a href="qwidget.html#cursor-prop">setCursor</a>().</p>
<h3 class="fn"><a name="grabShortcut"></a>int QWidget::grabShortcut ( const <a href="qkeysequence.html">QKeySequence</a> &amp; <i>key</i>, <a href="qt.html#ShortcutContext-enum">Qt::ShortcutContext</a> <i>context</i> = Qt::WindowShortcut )</h3>
<p>Adds a shortcut to Qt's shortcut system that watches for the given <i>key</i> sequence in the given <i>context</i>. If the <i>context</i> is not <tt>OnApplication</tt>, the shortcut is local to this widget; otherwise it applies to the application as a whole.</p>
<p>If the same <i>key</i> sequence has been grabbed by several widgets, when the <i>key</i> sequence occurs a <a href="qevent.html#Type-enum">QEvent::Shortcut</a> event is sent to all the widgets to which it applies in a non-deterministic order, but with the ``ambiguous'' flag set to true.</p>
<p><b>Warning:</b> You should not normally need to use this function; instead create <a href="qaction.html">QAction</a>s with the shortcut key sequences you require (if you also want equivalent menu options and toolbar buttons), or create <a href="qshortcut.html">QShortcut</a>s if you just need key sequences. Both <a href="qaction.html">QAction</a> and <a href="qshortcut.html">QShortcut</a> handle all the event filtering for you, and provide signals which are triggered when the user triggers the key sequence, so are much easier to use than this low-level function.</p>
<p>See also <a href="qwidget.html#releaseShortcut">releaseShortcut</a>() and <a href="qwidget.html#setShortcutEnabled">setShortcutEnabled</a>().</p>
<h3 class="fn"><a name="hasEditFocus"></a>bool QWidget::hasEditFocus () const</h3>
<p>Returns true if this widget currently has edit focus; otherwise false.</p>
<p>This feature is available in Qtopia Core only.</p>
<p>See also <a href="qwidget.html#setEditFocus">setEditFocus</a>() and <a href="qapplication.html#keypadNavigationEnabled">QApplication::keypadNavigationEnabled</a>().</p>
<h3 class="fn"><a name="heightForWidth"></a>int QWidget::heightForWidth ( int <i>w</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the preferred height for this widget, given the width <i>w</i>.</p>
<p>If this widget has a layout, the default implementation returns the layout's preferred height. if there is no layout, the default implementation returns -1 indicating that the preferred height does not depend on the width.</p>
<h3 class="fn"><a name="hide"></a>void QWidget::hide ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Hides the widget. This function is equivalent to setVisible(false).</p>
<p><b>Note:</b> If you are working with <a href="qdialog.html">QDialog</a> or its subclasses and you invoke the <a href="qwidget.html#show">show</a>() function after this function, the dialog will be displayed in its original position.</p>
<p>See also <a href="qwidget.html#hideEvent">hideEvent</a>(), <a href="qwidget.html#isHidden">isHidden</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#visible-prop">setVisible</a>(), <a href="qwidget.html#visible-prop">isVisible</a>(), and <a href="qwidget.html#close">close</a>().</p>
<h3 class="fn"><a name="hideEvent"></a>void QWidget::hideEvent ( <a href="qhideevent.html">QHideEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive widget hide events. The event is passed in the <i>event</i> parameter.</p>
<p>Hide events are sent to widgets immediately after they have been hidden.</p>
<p>Note: A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g&#x2e; a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again. After receiving a spontaneous hide event, a widget is still considered visible in the sense of <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<p>See also <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#event">event</a>(), and <a href="qhideevent.html">QHideEvent</a>.</p>
<h3 class="fn"><a name="inputContext"></a><a href="qinputcontext.html">QInputContext</a> * QWidget::inputContext ()</h3>
<p>This function returns the <a href="qinputcontext.html">QInputContext</a> for this widget. By default the input context is inherited from the widgets parent. For toplevels it is inherited from <a href="qapplication.html">QApplication</a>.</p>
<p>You can override this and set a special input context for this widget by using the <a href="qwidget.html#setInputContext">setInputContext</a>() method.</p>
<p>See also <a href="qwidget.html#setInputContext">setInputContext</a>().</p>
<h3 class="fn"><a name="inputMethodEvent"></a>void QWidget::inputMethodEvent ( <a href="qinputmethodevent.html">QInputMethodEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive Input Method composition events. This handler is called when the state of the input method changes.</p>
<p>Note that when creating custom text editing widgets, the <a href="qt.html#WidgetAttribute-enum">Qt::WA_InputMethodEnabled</a> window attribute must be set explicitly (using the <a href="qwidget.html#setAttribute">setAttribute</a>() function) in order to receive input method events.</p>
<p>The default implementation calls event-&gt;ignore(), which rejects the Input Method event. See the <a href="qinputmethodevent.html">QInputMethodEvent</a> documentation for more details.</p>
<p>See also <a href="qwidget.html#event">event</a>() and <a href="qinputmethodevent.html">QInputMethodEvent</a>.</p>
<h3 class="fn"><a name="inputMethodQuery"></a><a href="qvariant.html">QVariant</a> QWidget::inputMethodQuery ( <a href="qt.html#InputMethodQuery-enum">Qt::InputMethodQuery</a> <i>query</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>This method is only relevant for input widgets. It is used by the input method to query a set of properties of the widget to be able to support complex input method operations as support for surrounding text and reconversions.</p>
<p><i>query</i> specifies which property is queried.</p>
<p>See also <a href="qwidget.html#inputMethodEvent">inputMethodEvent</a>(), <a href="qinputmethodevent.html">QInputMethodEvent</a>, and <a href="qinputcontext.html">QInputContext</a>.</p>
<h3 class="fn"><a name="insertAction"></a>void QWidget::insertAction ( <a href="qaction.html">QAction</a> * <i>before</i>, <a href="qaction.html">QAction</a> * <i>action</i> )</h3>
<p>Inserts the action <i>action</i> to this widget's list of actions, before the action <i>before</i>. It appends the action if <i>before</i> is 0 or <i>before</i> is not a valid action for this widget.</p>
<p>A <a href="qwidget.html">QWidget</a> should only have one of each action.</p>
<p>See also <a href="qwidget.html#removeAction">removeAction</a>(), <a href="qwidget.html#addAction">addAction</a>(), <a href="qmenu.html">QMenu</a>, <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a>, and <a href="qwidget.html#actions">actions</a>().</p>
<h3 class="fn"><a name="insertActions"></a>void QWidget::insertActions ( <a href="qaction.html">QAction</a> * <i>before</i>, <a href="qlist.html">QList</a>&lt;<a href="qaction.html">QAction</a> *&gt; <i>actions</i> )</h3>
<p>Inserts the actions <i>actions</i> to this widget's list of actions, before the action <i>before</i>. It appends the action if <i>before</i> is 0 or <i>before</i> is not a valid action for this widget.</p>
<p>A <a href="qwidget.html">QWidget</a> can have at most one of each action.</p>
<p>See also <a href="qwidget.html#removeAction">removeAction</a>(), <a href="qmenu.html">QMenu</a>, <a href="qwidget.html#insertAction">insertAction</a>(), and <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a>.</p>
<h3 class="fn"><a name="isAncestorOf"></a>bool QWidget::isAncestorOf ( const QWidget * <i>child</i> ) const</h3>
<p>Returns true if this widget is a parent, (or grandparent and so on to any level), of the given <i>child</i>, and both widgets are within the same window; otherwise returns false.</p>
<h3 class="fn"><a name="isEnabledTo"></a>bool QWidget::isEnabledTo ( QWidget * <i>ancestor</i> ) const</h3>
<p>Returns true if this widget would become enabled if <i>ancestor</i> is enabled; otherwise returns false.</p>
<p>This is the case if neither the widget itself nor every parent up to but excluding <i>ancestor</i> has been explicitly disabled.</p>
<p>isEnabledTo(0) is equivalent to <a href="qwidget.html#enabled-prop">isEnabled</a>().</p>
<p>See also <a href="qwidget.html#enabled-prop">setEnabled</a>() and <a href="qwidget.html#enabled-prop">enabled</a>.</p>
<h3 class="fn"><a name="isHidden"></a>bool QWidget::isHidden () const</h3>
<p>Returns true if the widget is hidden, otherwise returns false.</p>
<p>A hidden widget will only become visible when <a href="qwidget.html#show">show</a>() is called on it. It will not be automatically shown when the parent is shown.</p>
<p>To check visiblity, use !<a href="qwidget.html#visible-prop">isVisible</a>() instead (notice the exclamation mark).</p>
<p>isHidden() implies !<a href="qwidget.html#visible-prop">isVisible</a>(), but a widget can be not visible and not hidden at the same time. This is the case for widgets that are children of widgets that are not visible.</p>
<p>Widgets are hidden if they were created as independent windows or as children of visible widgets, or if <a href="qwidget.html#hide">hide</a>() or setVisible(false) was called.</p>
<h3 class="fn"><a name="isVisibleTo"></a>bool QWidget::isVisibleTo ( QWidget * <i>ancestor</i> ) const</h3>
<p>Returns true if this widget would become visible if <i>ancestor</i> is shown; otherwise returns false.</p>
<p>The true case occurs if neither the widget itself nor any parent up to but excluding <i>ancestor</i> has been explicitly hidden.</p>
<p>This function will still return true if the widget is obscured by other windows on the screen, but could be physically visible if it or they were to be moved.</p>
<p>isVisibleTo(0) is identical to <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<p>See also <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<h3 class="fn"><a name="isWindow"></a>bool QWidget::isWindow () const</h3>
<p>Returns true if the widget is an independent window, otherwise returns false.</p>
<p>A window is a widget that isn't visually the child of any other widget and that usually has a frame and a <a href="qwidget.html#windowTitle-prop">window title</a>.</p>
<p>A window can have a <a href="qwidget.html#parentWidget">parent widget</a>. It will then be grouped with its parent and deleted when the parent is deleted, minimized when the parent is minimized etc. If supported by the window manager, it will also have a common taskbar entry with its parent.</p>
<p><a href="qdialog.html">QDialog</a> and <a href="qmainwindow.html">QMainWindow</a> widgets are by default windows, even if a parent widget is specified in the constructor. This behavior is specified by the <a href="qt.html#WindowType-enum">Qt::Window</a> flag.</p>
<p>See also <a href="qwidget.html#window">window</a>(), <a href="qwidget.html#modal-prop">isModal</a>(), and <a href="qwidget.html#parentWidget">parentWidget</a>().</p>
<h3 class="fn"><a name="keyPressEvent"></a>void QWidget::keyPressEvent ( <a href="qkeyevent.html">QKeyEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive key press events for the widget.</p>
<p>A widget must call <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>() to accept focus initially and have focus in order to receive a key press event.</p>
<p>If you reimplement this handler, it is very important that you <a href="qkeyevent.html">ignore()</a> the event if you do not understand it, so that the widget's parent can interpret it.</p>
<p>The default implementation closes popup widgets if the user presses Esc. Otherwise the event is ignored.</p>
<p>See also <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qevent.html#ignore">QKeyEvent::ignore</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qkeyevent.html">QKeyEvent</a>, and <a href="widgets-tetrix.html">Tetrix Example</a>.</p>
<h3 class="fn"><a name="keyReleaseEvent"></a>void QWidget::keyReleaseEvent ( <a href="qkeyevent.html">QKeyEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive key release events for the widget.</p>
<p>A widget must <a href="qwidget.html#focusPolicy-prop">accept focus</a> initially and <a href="qwidget.html#focus-prop">have focus</a> in order to receive a key release event.</p>
<p>If you reimplement this handler, it is very important that you <a href="qkeyevent.html">ignore()</a> the release if you do not understand it, so that the widget's parent can interpret it.</p>
<p>The default implementation ignores the event.</p>
<p>See also <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qevent.html#ignore">QKeyEvent::ignore</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qkeyevent.html">QKeyEvent</a>.</p>
<h3 class="fn"><a name="keyboardGrabber"></a>QWidget * QWidget::keyboardGrabber ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns the widget that is currently grabbing the keyboard input.</p>
<p>If no widget in this application is currently grabbing the keyboard, 0 is returned.</p>
<p>See also <a href="qwidget.html#grabMouse">grabMouse</a>() and <a href="qwidget.html#mouseGrabber">mouseGrabber</a>().</p>
<h3 class="fn"><a name="layout"></a><a href="qlayout.html">QLayout</a> * QWidget::layout () const</h3>
<p>Returns the layout manager that is installed on this widget, or 0 if no layout manager is installed.</p>
<p>The layout manager sets the geometry of the widget's children that have been added to the layout.</p>
<p>See also <a href="qwidget.html#setLayout">setLayout</a>(), <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>(), and <a href="layout.html">Layout Classes</a>.</p>
<h3 class="fn"><a name="leaveEvent"></a>void QWidget::leaveEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive widget leave events which are passed in the <i>event</i> parameter.</p>
<p>A leave event is sent to the widget when the mouse cursor leaves the widget.</p>
<p>See also <a href="qwidget.html#enterEvent">enterEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), and <a href="qwidget.html#event">event</a>().</p>
<h3 class="fn"><a name="lower"></a>void QWidget::lower ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Lowers the widget to the bottom of the parent widget's stack.</p>
<p>After this call the widget will be visually behind (and therefore obscured by) any overlapping sibling widgets.</p>
<p>See also <a href="qwidget.html#raise">raise</a>() and <a href="qwidget.html#stackUnder">stackUnder</a>().</p>
<h3 class="fn"><a name="macCGHandle"></a><a href="qt.html#HANDLE-typedef">Qt::HANDLE</a> QWidget::macCGHandle () const</h3>
<p>Returns the CoreGraphics handle of the widget. Use of this function is not portable. This function will return 0 if no painter context can be established, or if the handle could not be created.</p>
<p><b>Warning:</b> This function is only available on Mac OS X.</p>
<h3 class="fn"><a name="macEvent"></a>bool QWidget::macEvent ( EventHandlerCallRef <i>caller</i>, EventRef <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This special event handler can be reimplemented in a subclass to receive native Macintosh events which are passed from the <i>caller</i> with the event details in the <i>event</i> parameter.</p>
<p>In your reimplementation of this function, if you want to stop the event being handled by Qt, return true. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.</p>
<p><b>Warning:</b> This function is not portable.</p>
<p><b>Warning:</b> This function is not currently called, consider using <a href="qapplication.html#macEventFilter">QApplication::macEventFilter</a>() instead.</p>
<p>See also <a href="qapplication.html#macEventFilter">QApplication::macEventFilter</a>().</p>
<h3 class="fn"><a name="macQDHandle"></a><a href="qt.html#HANDLE-typedef">Qt::HANDLE</a> QWidget::macQDHandle () const</h3>
<p>Returns the QuickDraw handle of the widget. Use of this function is not portable. This function will return 0 if QuickDraw is not supported, or if the handle could not be created.</p>
<p><b>Warning:</b> This function is only available on Mac OS X.</p>
<h3 class="fn"><a name="mapFrom"></a><a href="qpoint.html">QPoint</a> QWidget::mapFrom ( QWidget * <i>parent</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
<p>Translates the widget coordinate <i>pos</i> from the coordinate system of <i>parent</i> to this widget's coordinate system. The <i>parent</i> must not be 0 and must be a parent of the calling widget.</p>
<p>See also <a href="qwidget.html#mapTo">mapTo</a>(), <a href="qwidget.html#mapFromParent">mapFromParent</a>(), <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>(), and <a href="qwidget.html#underMouse">underMouse</a>().</p>
<h3 class="fn"><a name="mapFromGlobal"></a><a href="qpoint.html">QPoint</a> QWidget::mapFromGlobal ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
<p>Translates the global screen coordinate <i>pos</i> to widget coordinates.</p>
<p>See also <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), <a href="qwidget.html#mapFrom">mapFrom</a>(), and <a href="qwidget.html#mapFromParent">mapFromParent</a>().</p>
<h3 class="fn"><a name="mapFromParent"></a><a href="qpoint.html">QPoint</a> QWidget::mapFromParent ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
<p>Translates the parent widget coordinate <i>pos</i> to widget coordinates.</p>
<p>Same as <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>() if the widget has no parent.</p>
<p>See also <a href="qwidget.html#mapToParent">mapToParent</a>(), <a href="qwidget.html#mapFrom">mapFrom</a>(), <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>(), and <a href="qwidget.html#underMouse">underMouse</a>().</p>
<h3 class="fn"><a name="mapTo"></a><a href="qpoint.html">QPoint</a> QWidget::mapTo ( QWidget * <i>parent</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
<p>Translates the widget coordinate <i>pos</i> to the coordinate system of <i>parent</i>. The <i>parent</i> must not be 0 and must be a parent of the calling widget.</p>
<p>See also <a href="qwidget.html#mapFrom">mapFrom</a>(), <a href="qwidget.html#mapToParent">mapToParent</a>(), <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), and <a href="qwidget.html#underMouse">underMouse</a>().</p>
<h3 class="fn"><a name="mapToGlobal"></a><a href="qpoint.html">QPoint</a> QWidget::mapToGlobal ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
<p>Translates the widget coordinate <i>pos</i> to global screen coordinates. For example, <tt>mapToGlobal(QPoint(0,0))</tt> would give the global coordinates of the top-left pixel of the widget.</p>
<p>See also <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>(), <a href="qwidget.html#mapTo">mapTo</a>(), and <a href="qwidget.html#mapToParent">mapToParent</a>().</p>
<h3 class="fn"><a name="mapToParent"></a><a href="qpoint.html">QPoint</a> QWidget::mapToParent ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
<p>Translates the widget coordinate <i>pos</i> to a coordinate in the parent widget.</p>
<p>Same as <a href="qwidget.html#mapToGlobal">mapToGlobal</a>() if the widget has no parent.</p>
<p>See also <a href="qwidget.html#mapFromParent">mapFromParent</a>(), <a href="qwidget.html#mapTo">mapTo</a>(), <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), and <a href="qwidget.html#underMouse">underMouse</a>().</p>
<h3 class="fn"><a name="mask"></a><a href="qregion.html">QRegion</a> QWidget::mask () const</h3>
<p>Returns the mask currently set on a widget. If no mask is set the return value will be an empty region.</p>
<p>See also <a href="qwidget.html#setMask">setMask</a>(), <a href="qwidget.html#clearMask">clearMask</a>(), <a href="qregion.html#isEmpty">QRegion::isEmpty</a>(), and <a href="widgets-shapedclock.html">Shaped Clock Example</a>.</p>
<h3 class="fn"><a name="metric"></a>int QWidget::metric ( <a href="qpaintdevice.html#PaintDeviceMetric-enum">PaintDeviceMetric</a> <i>m</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Internal implementation of the virtual <a href="qpaintdevice.html#metric">QPaintDevice::metric</a>() function.</p>
<p><i>m</i> is the metric to get.</p>
<p>Reimplemented from <a href="qpaintdevice.html#metric">QPaintDevice</a>.</p>
<h3 class="fn"><a name="mouseDoubleClickEvent"></a>void QWidget::mouseDoubleClickEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive mouse double click events for the widget.</p>
<p>The default implementation generates a normal mouse press event.</p>
<p>Note that the widgets gets a <a href="qwidget.html#mousePressEvent">mousePressEvent</a>() and a <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>() before the mouseDoubleClickEvent().</p>
<p>See also <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qmouseevent.html">QMouseEvent</a>.</p>
<h3 class="fn"><a name="mouseGrabber"></a>QWidget * QWidget::mouseGrabber ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns the widget that is currently grabbing the mouse input.</p>
<p>If no widget in this application is currently grabbing the mouse, 0 is returned.</p>
<p>See also <a href="qwidget.html#grabMouse">grabMouse</a>() and <a href="qwidget.html#keyboardGrabber">keyboardGrabber</a>().</p>
<h3 class="fn"><a name="mouseMoveEvent"></a>void QWidget::mouseMoveEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive mouse move events for the widget.</p>
<p>If mouse tracking is switched off, mouse move events only occur if a mouse button is pressed while the mouse is being moved. If mouse tracking is switched on, mouse move events occur even if no mouse button is pressed.</p>
<p><a href="qmouseevent.html#pos">QMouseEvent::pos</a>() reports the position of the mouse cursor, relative to this widget. For press and release events, the position is usually the same as the position of the last mouse move event, but it might be different if the user's hand shakes. This is a feature of the underlying window system, not Qt.</p>
<p>See also <a href="qwidget.html#mouseTracking-prop">setMouseTracking</a>(), <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qmouseevent.html">QMouseEvent</a>, and <a href="widgets-scribble.html">Scribble Example</a>.</p>
<h3 class="fn"><a name="mousePressEvent"></a>void QWidget::mousePressEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive mouse press events for the widget.</p>
<p>If you create new widgets in the mousePressEvent() the <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>() may not end up where you expect, depending on the underlying window system (or X11 window manager), the widgets' location and maybe more.</p>
<p>The default implementation implements the closing of popup widgets when you click outside the window. For other widget types it does nothing.</p>
<p>See also <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qmouseevent.html">QMouseEvent</a>, and <a href="widgets-scribble.html">Scribble Example</a>.</p>
<h3 class="fn"><a name="mouseReleaseEvent"></a>void QWidget::mouseReleaseEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive mouse release events for the widget.</p>
<p>See also <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qmouseevent.html">QMouseEvent</a>, and <a href="widgets-scribble.html">Scribble Example</a>.</p>
<h3 class="fn"><a name="moveEvent"></a>void QWidget::moveEvent ( <a href="qmoveevent.html">QMoveEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive widget move events which are passed in the <i>event</i> parameter. When the widget receives this event, it is already at the new position.</p>
<p>The old position is accessible through <a href="qmoveevent.html#oldPos">QMoveEvent::oldPos</a>().</p>
<p>See also <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qwidget.html#pos-prop">move</a>(), and <a href="qmoveevent.html">QMoveEvent</a>.</p>
<h3 class="fn"><a name="nextInFocusChain"></a>QWidget * QWidget::nextInFocusChain () const</h3>
<p>Returns the next widget in this widget's focus chain.</p>
<h3 class="fn"><a name="overrideWindowFlags"></a>void QWidget::overrideWindowFlags ( <a href="qt.html#WindowType-enum">Qt::WindowFlags</a> <i>flags</i> )</h3>
<p>Sets the window flags for the widget to <i>flags</i>, <i>without</i> telling the window system.</p>
<p><b>Warning:</b> Do not call this function unless you really know what you're doing.</p>
<p>See also <a href="qwidget.html#windowFlags-prop">setWindowFlags</a>().</p>
<h3 class="fn"><a name="paintEngine"></a><a href="qpaintengine.html">QPaintEngine</a> * QWidget::paintEngine () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the widget's paint engine.</p>
<p>Reimplemented from <a href="qpaintdevice.html#paintEngine">QPaintDevice</a>.</p>
<h3 class="fn"><a name="paintEvent"></a>void QWidget::paintEvent ( <a href="qpaintevent.html">QPaintEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive paint events which are passed in the <i>event</i> parameter.</p>
<p>A paint event is a request to repaint all or part of the widget. It can happen as a result of <a href="qwidget.html#repaint">repaint</a>() or <a href="qwidget.html#update">update</a>(), or because the widget was obscured and has now been uncovered, or for many other reasons.</p>
<p>Many widgets can simply repaint their entire surface when asked to, but some slow widgets need to optimize by painting only the requested region: <a href="qpaintevent.html#region">QPaintEvent::region</a>(). This speed optimization does not change the result, as painting is clipped to that region during event processing. <a href="qlistview.html">QListView</a> and <a href="qtableview.html">QTableView</a> do this, for example.</p>
<p>Qt also tries to speed up painting by merging multiple paint events into one. When <a href="qwidget.html#update">update</a>() is called several times or the window system sends several paint events, Qt merges these events into one event with a larger region (see <a href="qregion.html#united">QRegion::united</a>()). <a href="qwidget.html#repaint">repaint</a>() does not permit this optimization, so we suggest using <a href="qwidget.html#update">update</a>() whenever possible.</p>
<p>When the paint event occurs, the update region has normally been erased, so that you're painting on the widget's background.</p>
<p>The background can be set using <a href="qwidget.html#setBackgroundRole">setBackgroundRole</a>() and <a href="qwidget.html#palette-prop">setPalette</a>().</p>
<p>From Qt 4.0, <a href="qwidget.html">QWidget</a> automatically double-buffers its painting, so there's no need to write double-buffering code in paintEvent() to avoid flicker.</p>
<p>Note: Under X11 it is possible to toggle the global double buffering by calling <tt>qt_x11_set_global_double_buffer()</tt>. Example usage:</p>
<pre> ...
 extern void qt_x11_set_global_double_buffer(bool);
 qt_x11_set_global_double_buffer(false);
 ...</pre>
<p>Note: In general, one should refrain from calling <a href="qwidget.html#update">update</a>() or <a href="qwidget.html#repaint">repaint</a>() <b>inside</b> of paintEvent(). For example, calling <a href="qwidget.html#update">update</a>() or <a href="qwidget.html#repaint">repaint</a>() on children inside a paintEvent() results in undefined behavior; the child may or may not get a paint event.</p>
<p>See also <a href="qwidget.html#event">event</a>(), <a href="qwidget.html#repaint">repaint</a>(), <a href="qwidget.html#update">update</a>(), <a href="qpainter.html">QPainter</a>, <a href="qpixmap.html">QPixmap</a>, <a href="qpaintevent.html">QPaintEvent</a>, and <a href="widgets-analogclock.html">Analog Clock Example</a>.</p>
<h3 class="fn"><a name="parentWidget"></a>QWidget * QWidget::parentWidget () const</h3>
<p>Returns the parent of this widget, or 0 if it does not have any parent widget.</p>
<h3 class="fn"><a name="qwsEvent"></a>bool QWidget::qwsEvent ( <a href="qwsevent.html">QWSEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This special event handler can be reimplemented in a subclass to receive native Qtopia Core events which are passed in the <i>event</i> parameter.</p>
<p>In your reimplementation of this function, if you want to stop the event being handled by Qt, return true. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.</p>
<p><b>Warning:</b> This function is not portable.</p>
<p>See also <a href="qapplication.html#qwsEventFilter">QApplication::qwsEventFilter</a>().</p>
<h3 class="fn"><a name="raise"></a>void QWidget::raise ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Raises this widget to the top of the parent widget's stack.</p>
<p>After this call the widget will be visually in front of any overlapping sibling widgets.</p>
<p>See also <a href="qwidget.html#lower">lower</a>() and <a href="qwidget.html#stackUnder">stackUnder</a>().</p>
<h3 class="fn"><a name="releaseDC"></a>void QWidget::releaseDC ( HDC <i>hdc</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Releases the HDC <i>hdc</i> acquired by a previous call to <a href="qwidget.html#getDC">getDC</a>().</p>
<p><b>Warning:</b> Using this function is not portable.</p>
<h3 class="fn"><a name="releaseKeyboard"></a>void QWidget::releaseKeyboard ()</h3>
<p>Releases the keyboard grab.</p>
<p>See also <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), <a href="qwidget.html#grabMouse">grabMouse</a>(), and <a href="qwidget.html#releaseMouse">releaseMouse</a>().</p>
<h3 class="fn"><a name="releaseMouse"></a>void QWidget::releaseMouse ()</h3>
<p>Releases the mouse grab.</p>
<p>See also <a href="qwidget.html#grabMouse">grabMouse</a>(), <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), and <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>().</p>
<h3 class="fn"><a name="releaseShortcut"></a>void QWidget::releaseShortcut ( int <i>id</i> )</h3>
<p>Removes the shortcut with the given <i>id</i> from Qt's shortcut system. The widget will no longer receive <a href="qevent.html#Type-enum">QEvent::Shortcut</a> events for the shortcut's key sequence (unless it has other shortcuts with the same key sequence).</p>
<p><b>Warning:</b> You should not normally need to use this function since Qt's shortcut system removes shortcuts automatically when their parent widget is destroyed. It is best to use <a href="qaction.html">QAction</a> or <a href="qshortcut.html">QShortcut</a> to handle shortcuts, since they are easier to use than this low-level function. Note also that this is an expensive operation.</p>
<p>See also <a href="qwidget.html#grabShortcut">grabShortcut</a>() and <a href="qwidget.html#setShortcutEnabled">setShortcutEnabled</a>().</p>
<h3 class="fn"><a name="removeAction"></a>void QWidget::removeAction ( <a href="qaction.html">QAction</a> * <i>action</i> )</h3>
<p>Removes the action <i>action</i> from this widget's list of actions.</p>
<p>See also <a href="qwidget.html#insertAction">insertAction</a>(), <a href="qwidget.html#actions">actions</a>(), and <a href="qwidget.html#insertAction">insertAction</a>().</p>
<h3 class="fn"><a name="render"></a>void QWidget::render ( <a href="qpaintdevice.html">QPaintDevice</a> * <i>target</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>targetOffset</i> = QPoint(), const <a href="qregion.html">QRegion</a> &amp; <i>sourceRegion</i> = QRegion(), <a href="qwidget.html#RenderFlag-enum">RenderFlags</a> <i>renderFlags</i> = RenderFlags( DrawWindowBackground | DrawChildren ) )</h3>
<p>Renders the <i>sourceRegion</i> of this widget into the <i>target</i> using <i>renderFlags</i> to determine how to render. Rendering starts at <i>targetOffset</i> in the <i>target</i>. For example:</p>
<pre> QPixmap pixmap(widget-&gt;size());
 widget-&gt;render(&amp;pixmap);</pre>
<p>If <i>sourceRegion</i> is a null region, this function will use <a href="qwidget.html#rect-prop">QWidget::rect</a>() as the region, i.e&#x2e; the entire widget.</p>
<p><b>Note:</b> Make sure to call <a href="qpainter.html#end">QPainter::end</a>() for the given <i>target</i>'s active painter (if any) before rendering. For example:</p>
<pre> QPainter painter(this);
 ...
 painter.end();
 myWidget-&gt;render(this);</pre>
<p>This function was introduced in Qt 4.3.</p>
<h3 class="fn"><a name="repaint"></a>void QWidget::repaint ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Repaints the widget directly by calling <a href="qwidget.html#paintEvent">paintEvent</a>() immediately, unless updates are disabled or the widget is hidden.</p>
<p>We suggest only using repaint() if you need an immediate repaint, for example during animation. In almost all circumstances <a href="qwidget.html#update">update</a>() is better, as it permits Qt to optimize for speed and minimize flicker.</p>
<p><b>Warning:</b> If you call repaint() in a function which may itself be called from <a href="qwidget.html#paintEvent">paintEvent</a>(), you may get infinite recursion. The <a href="qwidget.html#update">update</a>() function never causes recursion.</p>
<p>See also <a href="qwidget.html#update">update</a>(), <a href="qwidget.html#paintEvent">paintEvent</a>(), and <a href="qwidget.html#updatesEnabled-prop">setUpdatesEnabled</a>().</p>
<h3 class="fn"><a name="repaint-6"></a>void QWidget::repaint ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>This version repaints a rectangle (<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>) inside the widget.</p>
<p>If <i>w</i> is negative, it is replaced with <tt>width() - x</tt>, and if <i>h</i> is negative, it is replaced width <tt>height() - y</tt>.</p>
<h3 class="fn"><a name="repaint-7"></a>void QWidget::repaint ( const <a href="qrect.html">QRect</a> &amp; <i>r</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>This version repaints a rectangle <i>r</i> inside the widget.</p>
<h3 class="fn"><a name="repaint-8"></a>void QWidget::repaint ( const <a href="qregion.html">QRegion</a> &amp; <i>rgn</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>This version repaints a region <i>rgn</i> inside the widget.</p>
<h3 class="fn"><a name="resetInputContext"></a>void QWidget::resetInputContext ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>This function can be called on the widget that currently has focus to reset the input method operating on it.</p>
<p>See also <a href="qinputcontext.html">QInputContext</a> and <a href="qinputcontext.html#reset">QInputContext::reset</a>().</p>
<h3 class="fn"><a name="resizeEvent"></a>void QWidget::resizeEvent ( <a href="qresizeevent.html">QResizeEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive widget resize events which are passed in the <i>event</i> parameter. When resizeEvent() is called, the widget already has its new geometry. The old size is accessible through <a href="qresizeevent.html#oldSize">QResizeEvent::oldSize</a>().</p>
<p>The widget will be erased and receive a paint event immediately after processing the resize event. No drawing need be (or should be) done inside this handler.</p>
<p>See also <a href="qwidget.html#moveEvent">moveEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qwidget.html#size-prop">resize</a>(), <a href="qresizeevent.html">QResizeEvent</a>, <a href="qwidget.html#paintEvent">paintEvent</a>(), and <a href="widgets-scribble.html">Scribble Example</a>.</p>
<h3 class="fn"><a name="restoreGeometry"></a>bool QWidget::restoreGeometry ( const <a href="qbytearray.html">QByteArray</a> &amp; <i>geometry</i> )</h3>
<p>Restores the geometry and state top-level widgets stored in the byte array <i>geometry</i>. Returns true on success; otherwise returns false.</p>
<p>If the restored geometry is off-screen, it will be modified to be inside the the available screen geometry.</p>
<p>To restore geometry saved using <a href="qsettings.html">QSettings</a>, you can use code like this:</p>
<pre> QSettings settings(&quot;MyCompany&quot;, &quot;MyApp&quot;);
 myWidget-&gt;restoreGeometry(settings.value(&quot;myWidget/geometry&quot;).toByteArray());</pre>
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of geometry issues with windows.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qwidget.html#saveGeometry">saveGeometry</a>() and <a href="qsettings.html">QSettings</a>.</p>
<h3 class="fn"><a name="saveGeometry"></a><a href="qbytearray.html">QByteArray</a> QWidget::saveGeometry () const</h3>
<p>Saves the current geometry and state for top-level widgets.</p>
<p>To save the geometry when the window closes, you can implement a close event like this:</p>
<pre> void MyWidget::closeEvent(QCloseEvent *event)
 {
     QSettings settings(&quot;MyCompany&quot;, &quot;MyApp&quot;);
     settings.setValue(&quot;geometry&quot;, saveGeometry());
     QWidget::closeEvent(event);
 }</pre>
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of geometry issues with windows.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qwidget.html#restoreGeometry">restoreGeometry</a>().</p>
<h3 class="fn"><a name="scroll"></a>void QWidget::scroll ( int <i>dx</i>, int <i>dy</i> )</h3>
<p>Scrolls the widget including its children <i>dx</i> pixels to the right and <i>dy</i> downward. Both <i>dx</i> and <i>dy</i> may be negative.</p>
<p>After scrolling, the widgets will receive paint events for the areas that need to be repainted. For widgets that Qt knows to be opaque, this is only the newly exposed parts. For example, if an opaque widget is scrolled 8 pixels to the left, only an 8-pixel wide stripe at the right edge needs updating.</p>
<p>Since widgets propagate the contents of their parents by default, you need to set the <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> property, or use <a href="qwidget.html#setAttribute">setAttribute</a>() to set the <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a> attribute, to make a widget opaque.</p>
<p>For widgets that use contents propagation, a scroll will cause an update of the entire scroll area.</p>
<p>See also <a href="qwidget.html#transparency-and-double-buffering">Transparency and Double Buffering</a>.</p>
<h3 class="fn"><a name="scroll-2"></a>void QWidget::scroll ( int <i>dx</i>, int <i>dy</i>, const <a href="qrect.html">QRect</a> &amp; <i>r</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>This version only scrolls <i>r</i> and does not move the children of the widget.</p>
<p>If <i>r</i> is empty or invalid, the result is undefined.</p>
<p>See also <a href="qscrollarea.html">QScrollArea</a> and <a href="qimage-qt3.html#bitBlt">bitBlt</a>().</p>
<h3 class="fn"><a name="setAttribute"></a>void QWidget::setAttribute ( <a href="qt.html#WidgetAttribute-enum">Qt::WidgetAttribute</a> <i>attribute</i>, bool <i>on</i> = true )</h3>
<p>Sets the attribute <i>attribute</i> on this widget if <i>on</i> is true; otherwise clears the attribute.</p>
<p>See also <a href="qwidget.html#testAttribute">testAttribute</a>().</p>
<h3 class="fn"><a name="setBackgroundRole"></a>void QWidget::setBackgroundRole ( <a href="qpalette.html#ColorRole-enum">QPalette::ColorRole</a> <i>role</i> )</h3>
<p>Sets the background role of the widget to <i>role</i>.</p>
<p>The background role defines the brush from the widget's <a href="qwidget.html#palette-prop">palette</a> that is used to render the background.</p>
<p>If <i>role</i> is <a href="qpalette.html#ColorRole-enum">QPalette::NoRole</a>, then the widget inherits its parent's background role.</p>
<p>See also <a href="qwidget.html#backgroundRole">backgroundRole</a>() and <a href="qwidget.html#foregroundRole">foregroundRole</a>().</p>
<h3 class="fn"><a name="setContentsMargins"></a>void QWidget::setContentsMargins ( int <i>left</i>, int <i>top</i>, int <i>right</i>, int <i>bottom</i> )</h3>
<p>Sets the margins around the contents of the widget to have the sizes <i>left</i>, <i>top</i>, <i>right</i>, and <i>bottom</i>. The margins are used by the layout system, and may be used by subclasses to specify the area to draw in (e.g&#x2e; excluding the frame).</p>
<p>Changing the margins will trigger a <a href="qwidget.html#resizeEvent">resizeEvent</a>().</p>
<p>See also <a href="qwidget.html#contentsRect">contentsRect</a>() and <a href="qwidget.html#getContentsMargins">getContentsMargins</a>().</p>
<h3 class="fn"><a name="setDisabled"></a>void QWidget::setDisabled ( bool <i>disable</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Disables widget input events if <i>disable</i> is true; otherwise enables input events.</p>
<p>See the <a href="qwidget.html#enabled-prop">enabled</a> documentation for more information.</p>
<p>See also <a href="qwidget.html#isEnabledTo">isEnabledTo</a>(), <a href="qkeyevent.html">QKeyEvent</a>, <a href="qmouseevent.html">QMouseEvent</a>, and <a href="qwidget.html#changeEvent">changeEvent</a>().</p>
<h3 class="fn"><a name="setEditFocus"></a>void QWidget::setEditFocus ( bool <i>enable</i> )</h3>
<p>If <i>enable</i> is true, make this widget have edit focus, in which case <a href="qt.html#Key-enum">Qt::Key_Up</a> and <a href="qt.html#Key-enum">Qt::Key_Down</a> will be delivered to the widget normally; otherwise, <a href="qt.html#Key-enum">Qt::Key_Up</a> and <a href="qt.html#Key-enum">Qt::Key_Down</a> are used to change focus.</p>
<p>This feature is available in Qtopia Core only.</p>
<p>See also <a href="qwidget.html#hasEditFocus">hasEditFocus</a>() and <a href="qapplication.html#keypadNavigationEnabled">QApplication::keypadNavigationEnabled</a>().</p>
<h3 class="fn"><a name="setFixedHeight"></a>void QWidget::setFixedHeight ( int <i>h</i> )</h3>
<p>Sets both the minimum and maximum heights of the widget to <i>h</i> without changing the widths. Provided for convenience.</p>
<p>See also <a href="qwidget.html#sizeHint-prop">sizeHint</a>(), <a href="qwidget.html#minimumSize-prop">minimumSize</a>(), <a href="qwidget.html#maximumSize-prop">maximumSize</a>(), and <a href="qwidget.html#setFixedSize">setFixedSize</a>().</p>
<h3 class="fn"><a name="setFixedSize"></a>void QWidget::setFixedSize ( const <a href="qsize.html">QSize</a> &amp; <i>s</i> )</h3>
<p>Sets both the minimum and maximum sizes of the widget to <i>s</i>, thereby preventing it from ever growing or shrinking.</p>
<p>This will override the default size constraints set by <a href="qlayout.html">QLayout</a>.</p>
<p>Alternatively, if you want the widget to have a fixed size based on its contents, you can call QLayout::setSizeConstraint(<a href="qlayout.html#SizeConstraint-enum">QLayout::SetFixedSize</a>);</p>
<p>See also <a href="qwidget.html#maximumSize-prop">maximumSize</a> and <a href="qwidget.html#minimumSize-prop">minimumSize</a>.</p>
<h3 class="fn"><a name="setFixedSize-2"></a>void QWidget::setFixedSize ( int <i>w</i>, int <i>h</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Sets the width of the widget to <i>w</i> and the height to <i>h</i>.</p>
<h3 class="fn"><a name="setFixedWidth"></a>void QWidget::setFixedWidth ( int <i>w</i> )</h3>
<p>Sets both the minimum and maximum width of the widget to <i>w</i> without changing the heights. Provided for convenience.</p>
<p>See also <a href="qwidget.html#sizeHint-prop">sizeHint</a>(), <a href="qwidget.html#minimumSize-prop">minimumSize</a>(), <a href="qwidget.html#maximumSize-prop">maximumSize</a>(), and <a href="qwidget.html#setFixedSize">setFixedSize</a>().</p>
<h3 class="fn"><a name="setFocus"></a>void QWidget::setFocus ( <a href="qt.html#FocusReason-enum">Qt::FocusReason</a> <i>reason</i> )</h3>
<p>Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the <a href="qwidget.html#isActiveWindow-prop">active window</a>. The <i>reason</i> argument will be passed into any focus event sent from this function, it is used to give an explanation of what caused the widget to get focus.</p>
<p>First, a focus out event is sent to the focus widget (if any) to tell it that it is about to lose the focus. Then a focus in event is sent to this widget to tell it that it just received the focus. (Nothing happens if the focus in and focus out widgets are the same.)</p>
<p>setFocus() gives focus to a widget regardless of its focus policy, but does not clear any keyboard grab (see <a href="qwidget.html#grabKeyboard">grabKeyboard</a>()).</p>
<p>Be aware that if the widget is hidden, it will not accept focus until it is shown.</p>
<p><b>Warning:</b> If you call setFocus() in a function which may itself be called from <a href="qwidget.html#focusOutEvent">focusOutEvent</a>() or <a href="qwidget.html#focusInEvent">focusInEvent</a>(), you may get an infinite recursion.</p>
<p><a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>() <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>() <a href="qwidget.html#grabKeyboard">grabKeyboard</a>() <a href="qwidget.html#grabMouse">grabMouse</a>(), {Keyboard Focus}</p>
<p>See also <a href="qwidget.html#focus-prop">hasFocus</a>(), <a href="qwidget.html#clearFocus">clearFocus</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), and <a href="qwidget.html#focusOutEvent">focusOutEvent</a>().</p>
<h3 class="fn"><a name="setFocus-2"></a>void QWidget::setFocus ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the <a href="qwidget.html#isActiveWindow-prop">active window</a>.</p>
<h3 class="fn"><a name="setFocusProxy"></a>void QWidget::setFocusProxy ( QWidget * <i>w</i> )</h3>
<p>Sets the widget's focus proxy to widget <i>w</i>. If <i>w</i> is 0, the function resets this widget to have no focus proxy.</p>
<p>Some widgets can &quot;have focus&quot;, but create a child widget, such as <a href="qlineedit.html">QLineEdit</a>, to actually handle the focus. In this case, the widget can set the line edit to be its focus proxy.</p>
<p>setFocusProxy() sets the widget which will actually get focus when &quot;this widget&quot; gets it. If there is a focus proxy, <a href="qwidget.html#setFocus">setFocus</a>() and <a href="qwidget.html#focus-prop">hasFocus</a>() operate on the focus proxy.</p>
<p>See also <a href="qwidget.html#focusProxy">focusProxy</a>().</p>
<h3 class="fn"><a name="setForegroundRole"></a>void QWidget::setForegroundRole ( <a href="qpalette.html#ColorRole-enum">QPalette::ColorRole</a> <i>role</i> )</h3>
<p>Sets the foreground role of the widget to <i>role</i>.</p>
<p>The foreground role defines the color from the widget's <a href="qwidget.html#palette-prop">palette</a> that is used to draw the foreground.</p>
<p>If <i>role</i> is <a href="qpalette.html#ColorRole-enum">QPalette::NoRole</a>, the widget uses a foreground role that contrasts with the background role.</p>
<p>See also <a href="qwidget.html#foregroundRole">foregroundRole</a>() and <a href="qwidget.html#backgroundRole">backgroundRole</a>().</p>
<h3 class="fn"><a name="setHidden"></a>void QWidget::setHidden ( bool <i>hidden</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Convenience function, equivalent to setVisible(!<i>hidden</i>).</p>
<p>See also <a href="qwidget.html#isHidden">isHidden</a>().</p>
<h3 class="fn"><a name="setInputContext"></a>void QWidget::setInputContext ( <a href="qinputcontext.html">QInputContext</a> * <i>context</i> )</h3>
<p>This function sets the input context <i>context</i> on this widget.</p>
<p>See also <a href="qwidget.html#inputContext">inputContext</a>().</p>
<h3 class="fn"><a name="setLayout"></a>void QWidget::setLayout ( <a href="qlayout.html">QLayout</a> * <i>layout</i> )</h3>
<p>Sets the layout manager for this widget to <i>layout</i>.</p>
<p>If there already is a layout manager installed on this widget, <a href="qwidget.html">QWidget</a> won't let you install another. You must first delete the existing layout manager (returned by <a href="qwidget.html#layout">layout</a>()) before you can call setLayout() with the new layout.</p>
<p>Example:</p>
<pre>     QVBoxLayout *layout = new QVBoxLayout;
     layout-&gt;addWidget(lcd);
     layout-&gt;addWidget(slider);
     setLayout(layout);</pre>
<p>An alternative to calling this function is to pass this widget to the layout's constructor.</p>
<p>The <a href="qwidget.html">QWidget</a> will take ownership of <i>layout</i>.</p>
<p>See also <a href="qwidget.html#layout">layout</a>() and <a href="layout.html">Layout Classes</a>.</p>
<h3 class="fn"><a name="setMask"></a>void QWidget::setMask ( const <a href="qbitmap.html">QBitmap</a> &amp; <i>bitmap</i> )</h3>
<p>Causes only the pixels of the widget for which <i>bitmap</i> has a corresponding 1 bit to be visible. If the region includes pixels outside the <a href="qwidget.html#rect-prop">rect</a>() of the widget, window system controls in that area may or may not be visible, depending on the platform.</p>
<p>Note that this effect can be slow if the region is particularly complex.</p>
<p>The following code shows how an image with an alpha channel can be used to generate a mask for a widget:</p>
<pre>     QLabel topLevelLabel;
     QPixmap pixmap(&quot;:/images/tux.png&quot;);
     topLevelLabel.setPixmap(pixmap);
     topLevelLabel.setMask(pixmap.mask());</pre>
<p>The label shown by this code is masked using the image it contains, giving the appearance that an irregularly-shaped image is being drawn directly onto the screen.</p>
<p>Masked widgets receive mouse events only on their visible portions.</p>
<p>See also <a href="qwidget.html#mask">mask</a>(), <a href="qwidget.html#clearMask">clearMask</a>(), <a href="qwidget.html#windowOpacity-prop">windowOpacity</a>(), and <a href="widgets-shapedclock.html">Shaped Clock Example</a>.</p>
<h3 class="fn"><a name="setMask-2"></a>void QWidget::setMask ( const <a href="qregion.html">QRegion</a> &amp; <i>region</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>Causes only the parts of the widget which overlap <i>region</i> to be visible. If the region includes pixels outside the <a href="qwidget.html#rect-prop">rect</a>() of the widget, window system controls in that area may or may not be visible, depending on the platform.</p>
<p>Note that this effect can be slow if the region is particularly complex.</p>
<p>See also <a href="qwidget.html#windowOpacity-prop">windowOpacity</a>.</p>
<h3 class="fn"><a name="setParent"></a>void QWidget::setParent ( QWidget * <i>parent</i> )</h3>
<p>Sets the parent of the widget to <i>parent</i>, and resets the window flags. The widget is moved to position (0, 0) in its new parent.</p>
<p>If the new parent widget is in a different window, the reparented widget and its children are appended to the end of the <a href="qwidget.html#focusPolicy-prop">tab chain</a> of the new parent widget, in the same internal order as before. If one of the moved widgets had keyboard focus, setParent() calls <a href="qwidget.html#clearFocus">clearFocus</a>() for that widget.</p>
<p>If the new parent widget is in the same window as the old parent, setting the parent doesn't change the tab order or keyboard focus.</p>
<p>If the &quot;new&quot; parent widget is the old parent widget, this function does nothing.</p>
<p><b>Note:</b> The widget becomes invisible as part of changing its parent, even if it was previously visible. You must call <a href="qwidget.html#show">show</a>() to make the widget visible again.</p>
<p><b>Warning:</b> It is very unlikely that you will ever need this function. If you have a widget that changes its content dynamically, it is far easier to use <a href="qstackedwidget.html">QStackedWidget</a>.</p>
<p>See also <a href="qwidget.html#windowFlags-prop">setWindowFlags</a>().</p>
<h3 class="fn"><a name="setParent-2"></a>void QWidget::setParent ( QWidget * <i>parent</i>, <a href="qt.html#WindowType-enum">Qt::WindowFlags</a> <i>f</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>This function also takes widget flags, <i>f</i> as an argument.</p>
<h3 class="fn"><a name="setShortcutAutoRepeat"></a>void QWidget::setShortcutAutoRepeat ( int <i>id</i>, bool <i>enable</i> = true )</h3>
<p>If <i>enable</i> is true, auto repeat of the shortcut with the given <i>id</i> is enabled; otherwise it is disabled.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qwidget.html#grabShortcut">grabShortcut</a>() and <a href="qwidget.html#releaseShortcut">releaseShortcut</a>().</p>
<h3 class="fn"><a name="setShortcutEnabled"></a>void QWidget::setShortcutEnabled ( int <i>id</i>, bool <i>enable</i> = true )</h3>
<p>If <i>enable</i> is true, the shortcut with the given <i>id</i> is enabled; otherwise the shortcut is disabled.</p>
<p><b>Warning:</b> You should not normally need to use this function since Qt's shortcut system enables/disables shortcuts automatically as widgets become hidden/visible and gain or lose focus. It is best to use <a href="qaction.html">QAction</a> or <a href="qshortcut.html">QShortcut</a> to handle shortcuts, since they are easier to use than this low-level function.</p>
<p>See also <a href="qwidget.html#grabShortcut">grabShortcut</a>() and <a href="qwidget.html#releaseShortcut">releaseShortcut</a>().</p>
<h3 class="fn"><a name="setStyle"></a>void QWidget::setStyle ( <a href="qstyle.html">QStyle</a> * <i>style</i> )</h3>
<p>Sets the widget's GUI style to <i>style</i>. The ownership of the style object is not transferred.</p>
<p>If no style is set, the widget uses the application's style, <a href="qapplication.html#style">QApplication::style</a>() instead.</p>
<p>Setting a widget's style has no effect on existing or future child widgets.</p>
<p><b>Warning:</b> This function is particularly useful for demonstration purposes, where you want to show Qt's styling capabilities. Real applications should avoid it and use one consistent GUI style instead.</p>
<p>See also <a href="qwidget.html#style">style</a>(), <a href="qstyle.html">QStyle</a>, <a href="qapplication.html#style">QApplication::style</a>(), and <a href="qapplication.html#setStyle">QApplication::setStyle</a>().</p>
<h3 class="fn"><a name="setTabOrder"></a>void QWidget::setTabOrder ( QWidget * <i>first</i>, QWidget * <i>second</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Moves the <i>second</i> widget around the ring of focus widgets so that keyboard focus moves from the <i>first</i> widget to the <i>second</i> widget when the Tab key is pressed.</p>
<p>Note that since the tab order of the <i>second</i> widget is changed, you should order a chain like this:</p>
<pre> setTabOrder(a, b); <span class="comment">//</span> a to b
 setTabOrder(b, c); <span class="comment">//</span> a to b to c
 setTabOrder(c, d); <span class="comment">//</span> a to b to c to d</pre>
<p><i>not</i> like this:</p>
<pre><span class="comment"> //</span> WRONG
 setTabOrder(c, d); <span class="comment">//</span> c to d
 setTabOrder(a, b); <span class="comment">//</span> a to b AND c to d
 setTabOrder(b, c); <span class="comment">//</span> a to b to c, but not c to d</pre>
<p>If <i>first</i> or <i>second</i> has a focus proxy, setTabOrder() correctly substitutes the proxy.</p>
<p>See also <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#setFocusProxy">setFocusProxy</a>(), and <a href="focus.html">Keyboard Focus</a>.</p>
<h3 class="fn"><a name="setWindowRole"></a>void QWidget::setWindowRole ( const <a href="qstring.html">QString</a> &amp; <i>role</i> )</h3>
<p>Sets the window's role to <i>role</i>. This only makes sense for windows on X11.</p>
<p>See also <a href="qwidget.html#windowRole">windowRole</a>().</p>
<h3 class="fn"><a name="setWindowState"></a>void QWidget::setWindowState ( <a href="qt.html#WindowState-enum">Qt::WindowStates</a> <i>windowState</i> )</h3>
<p>Sets the window state to <i>windowState</i>. The window state is a OR'ed combination of <a href="qt.html#WindowState-enum">Qt::WindowState</a>: <a href="qt.html#WindowState-enum">Qt::WindowMinimized</a>, <a href="qt.html#WindowState-enum">Qt::WindowMaximized</a>, <a href="qt.html#WindowState-enum">Qt::WindowFullScreen</a>, and <a href="qt.html#WindowState-enum">Qt::WindowActive</a>.</p>
<p>If the window is not visible (i.e&#x2e; <a href="qwidget.html#visible-prop">isVisible</a>() returns false), the window state will take effect when <a href="qwidget.html#show">show</a>() is called. For visible windows, the change is immediate. For example, to toggle between full-screen and normal mode, use the following code:</p>
<pre> w-&gt;setWindowState(w-&gt;windowState() ^ Qt::WindowFullScreen);</pre>
<p>In order to restore and activate a minimized window (while preserving its maximized and/or full-screen state), use the following:</p>
<pre> w-&gt;setWindowState(w-&gt;windowState() &amp; ~Qt::WindowMinimized | Qt::WindowActive);</pre>
<p>Note: On some window systems <a href="qt.html#WindowState-enum">Qt::WindowActive</a> is not immediate, and may be ignored in certain cases.</p>
<p>When the window state changes, the widget receives a <a href="qwidget.html#changeEvent">changeEvent</a>() of type <a href="qevent.html#Type-enum">QEvent::WindowStateChange</a>.</p>
<p>See also <a href="qt.html#WindowState-enum">Qt::WindowState</a> and <a href="qwidget.html#windowState">windowState</a>().</p>
<h3 class="fn"><a name="setWindowSurface"></a>void QWidget::setWindowSurface ( QWindowSurface * <i>surface</i> )</h3>
<p><b>This function is under development and is subject to change.</b></p>
<p>Sets the window surface to be the <i>surface</i> specified. The <a href="qwidget.html">QWidget</a> takes will ownership of the <i>surface</i>. widget itself is deleted.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qwidget.html#windowSurface">windowSurface</a>().</p>
<h3 class="fn"><a name="show"></a>void QWidget::show ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Shows the widget and its child widgets. This function is equivalent to setVisible(true).</p>
<p>See also <a href="qwidget.html#showEvent">showEvent</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#visible-prop">setVisible</a>(), <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<h3 class="fn"><a name="showEvent"></a>void QWidget::showEvent ( <a href="qshowevent.html">QShowEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive widget show events which are passed in the <i>event</i> parameter.</p>
<p>Non-spontaneous show events are sent to widgets immediately before they are shown. The spontaneous show events of windows are delivered afterwards.</p>
<p>Note: A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g&#x2e; a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again. After receiving a spontaneous hide event, a widget is still considered visible in the sense of <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<p>See also <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#event">event</a>(), and <a href="qshowevent.html">QShowEvent</a>.</p>
<h3 class="fn"><a name="showFullScreen"></a>void QWidget::showFullScreen ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Shows the widget in full-screen mode.</p>
<p>Calling this function only affects <a href="qwidget.html#isWindow">windows</a>.</p>
<p>To return from full-screen mode, call <a href="qwidget.html#showNormal">showNormal</a>().</p>
<p>Full-screen mode works fine under Windows, but has certain problems under X. These problems are due to limitations of the ICCCM protocol that specifies the communication between X11 clients and the window manager. ICCCM simply does not understand the concept of non-decorated full-screen windows. Therefore, the best we can do is to request a borderless window and place and resize it to fill the entire screen. Depending on the window manager, this may or may not work. The borderless window is requested using MOTIF hints, which are at least partially supported by virtually all modern window managers.</p>
<p>An alternative would be to bypass the window manager entirely and create a window with the <a href="qt.html#WindowType-enum">Qt::X11BypassWindowManagerHint</a> flag. This has other severe problems though, like totally broken keyboard focus and very strange effects on desktop changes or when the user raises other windows.</p>
<p>X11 window managers that follow modern post-ICCCM specifications support full-screen mode properly.</p>
<p>See also <a href="qwidget.html#showNormal">showNormal</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<h3 class="fn"><a name="showMaximized"></a>void QWidget::showMaximized ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Shows the widget maximized.</p>
<p>Calling this function only affects <a href="qwidget.html#isWindow">windows</a>.</p>
<p>On X11, this function may not work properly with certain window managers. See <a href="geometry.html">Window Geometry</a> for an explanation.</p>
<p>See also <a href="qwidget.html#setWindowState">setWindowState</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<h3 class="fn"><a name="showMinimized"></a>void QWidget::showMinimized ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Shows the widget minimized, as an icon.</p>
<p>Calling this function only affects <a href="qwidget.html#isWindow">windows</a>.</p>
<p>See also <a href="qwidget.html#showNormal">showNormal</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#visible-prop">isVisible</a>(), and <a href="qwidget.html#minimized-prop">isMinimized</a>().</p>
<h3 class="fn"><a name="showNormal"></a>void QWidget::showNormal ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Restores the widget after it has been maximized or minimized.</p>
<p>Calling this function only affects <a href="qwidget.html#isWindow">windows</a>.</p>
<p>See also <a href="qwidget.html#setWindowState">setWindowState</a>(), <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<h3 class="fn"><a name="stackUnder"></a>void QWidget::stackUnder ( QWidget * <i>w</i> )</h3>
<p>Places the widget under <i>w</i> in the parent widget's stack.</p>
<p>To make this work, the widget itself and <i>w</i> must be siblings.</p>
<p>See also <a href="qwidget.html#raise">raise</a>() and <a href="qwidget.html#lower">lower</a>().</p>
<h3 class="fn"><a name="style"></a><a href="qstyle.html">QStyle</a> * QWidget::style () const</h3>
<p>See also <a href="qwidget.html#setStyle">QWidget::setStyle</a>(), <a href="qapplication.html#setStyle">QApplication::setStyle</a>(), and <a href="qapplication.html#style">QApplication::style</a>().</p>
<h3 class="fn"><a name="tabletEvent"></a>void QWidget::tabletEvent ( <a href="qtabletevent.html">QTabletEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive tablet events for the widget.</p>
<p>If you reimplement this handler, it is very important that you <a href="qtabletevent.html">ignore()</a> the event if you do not handle it, so that the widget's parent can interpret it.</p>
<p>The default implementation ignores the event.</p>
<p>See also <a href="qevent.html#ignore">QTabletEvent::ignore</a>(), <a href="qevent.html#accept">QTabletEvent::accept</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qtabletevent.html">QTabletEvent</a>.</p>
<h3 class="fn"><a name="testAttribute"></a>bool QWidget::testAttribute ( <a href="qt.html#WidgetAttribute-enum">Qt::WidgetAttribute</a> <i>attribute</i> ) const</h3>
<p>Returns true if attribute <i>attribute</i> is set on this widget; otherwise returns false.</p>
<p>See also <a href="qwidget.html#setAttribute">setAttribute</a>().</p>
<h3 class="fn"><a name="underMouse"></a>bool QWidget::underMouse () const</h3>
<p>Returns true if the widget is under the mouse cursor; otherwise returns false.</p>
<p>This value is not updated properly during drag and drop operations.</p>
<p>See also <a href="qwidget.html#enterEvent">enterEvent</a>() and <a href="qwidget.html#leaveEvent">leaveEvent</a>().</p>
<h3 class="fn"><a name="update"></a>void QWidget::update ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Updates the widget unless updates are disabled or the widget is hidden.</p>
<p>This function does not cause an immediate repaint; instead it schedules a paint event for processing when Qt returns to the main event loop. This permits Qt to optimize for more speed and less flicker than a call to <a href="qwidget.html#repaint">repaint</a>() does.</p>
<p>Calling update() several times normally results in just one <a href="qwidget.html#paintEvent">paintEvent</a>() call.</p>
<p>Qt normally erases the widget's area before the <a href="qwidget.html#paintEvent">paintEvent</a>() call. If the <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a> widget attribute is set, the widget is responsible for painting all its pixels with an opaque color.</p>
<p>See also <a href="qwidget.html#repaint">repaint</a>(), <a href="qwidget.html#paintEvent">paintEvent</a>(), <a href="qwidget.html#updatesEnabled-prop">setUpdatesEnabled</a>(), and <a href="widgets-analogclock.html">Analog Clock Example</a>.</p>
<h3 class="fn"><a name="update-2"></a>void QWidget::update ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>This version updates a rectangle (<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>) inside the widget.</p>
<h3 class="fn"><a name="update-3"></a>void QWidget::update ( const <a href="qrect.html">QRect</a> &amp; <i>r</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>This version updates a rectangle <i>r</i> inside the widget.</p>
<h3 class="fn"><a name="update-4"></a>void QWidget::update ( const <a href="qregion.html">QRegion</a> &amp; <i>rgn</i> )</h3>
<p>This is an overloaded member function, provided for convenience.</p>
<p>This version repaints a region <i>rgn</i> inside the widget.</p>
<h3 class="fn"><a name="updateGeometry"></a>void QWidget::updateGeometry ()</h3>
<p>Notifies the layout system that this widget has changed and may need to change geometry.</p>
<p>Call this function if the <a href="qwidget.html#sizeHint-prop">sizeHint</a>() or <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>() have changed.</p>
<p>For explicitly hidden widgets, updateGeometry() is a no-op. The layout system will be notified as soon as the widget is shown.</p>
<h3 class="fn"><a name="updateMicroFocus"></a>void QWidget::updateMicroFocus ()&nbsp;&nbsp;<tt> [protected slot]</tt></h3>
<p>Updates the widget's micro focus.</p>
<p>See also <a href="qinputcontext.html">QInputContext</a>.</p>
<h3 class="fn"><a name="visibleRegion"></a><a href="qregion.html">QRegion</a> QWidget::visibleRegion () const</h3>
<p>Returns the unobscured region where paint events can occur.</p>
<p>For visible widgets, this is an approximation of the area not covered by other widgets; otherwise, this is an empty region.</p>
<p>The <a href="qwidget.html#repaint">repaint</a>() function calls this function if necessary, so in general you do not need to call it.</p>
<h3 class="fn"><a name="wheelEvent"></a>void QWidget::wheelEvent ( <a href="qwheelevent.html">QWheelEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive wheel events for the widget.</p>
<p>If you reimplement this handler, it is very important that you <a href="qwheelevent.html">ignore()</a> the event if you do not handle it, so that the widget's parent can interpret it.</p>
<p>The default implementation ignores the event.</p>
<p>See also <a href="qevent.html#ignore">QWheelEvent::ignore</a>(), <a href="qevent.html#accept">QWheelEvent::accept</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qwheelevent.html">QWheelEvent</a>.</p>
<h3 class="fn"><a name="winEvent"></a>bool QWidget::winEvent ( MSG * <i>message</i>, long * <i>result</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This special event handler can be reimplemented in a subclass to receive native Windows events which are passed in the <i>message</i> parameter.</p>
<p>In your reimplementation of this function, if you want to stop the event being handled by Qt, return true and set <i>result</i> to the value that the window procedure should return. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.</p>
<p><b>Warning:</b> This function is not portable.</p>
<p>See also <a href="qcoreapplication.html#winEventFilter">QApplication::winEventFilter</a>().</p>
<h3 class="fn"><a name="winId"></a><a href="qwidget.html#WId-typedef">WId</a> QWidget::winId () const</h3>
<p>Returns the window system identifier of the widget.</p>
<p>Portable in principle, but if you use it you are probably about to do something non-portable. Be careful.</p>
<p>See also <a href="qwidget.html#find">find</a>().</p>
<h3 class="fn"><a name="window"></a>QWidget * QWidget::window () const</h3>
<p>Returns the window for this widget, i.e&#x2e; the next ancestor widget that has (or could have) a window-system frame.</p>
<p>If the widget is a window, the widget itself is returned.</p>
<p>Typical usage is changing the window title:</p>
<pre> aWidget-&gt;window()-&gt;setWindowTitle(&quot;New Window Title&quot;);</pre>
<p>See also <a href="qwidget.html#isWindow">isWindow</a>().</p>
<h3 class="fn"><a name="windowRole"></a><a href="qstring.html">QString</a> QWidget::windowRole () const</h3>
<p>Returns the window's role, or an empty string.</p>
<p>See also <a href="qwidget.html#setWindowRole">setWindowRole</a>(), <a href="qwidget.html#windowIcon-prop">windowIcon</a>, and <a href="qwidget.html#windowTitle-prop">windowTitle</a>.</p>
<h3 class="fn"><a name="windowState"></a><a href="qt.html#WindowState-enum">Qt::WindowStates</a> QWidget::windowState () const</h3>
<p>Returns the current window state. The window state is a OR'ed combination of <a href="qt.html#WindowState-enum">Qt::WindowState</a>: <a href="qt.html#WindowState-enum">Qt::WindowMinimized</a>, <a href="qt.html#WindowState-enum">Qt::WindowMaximized</a>, <a href="qt.html#WindowState-enum">Qt::WindowFullScreen</a>, and <a href="qt.html#WindowState-enum">Qt::WindowActive</a>.</p>
<p>See also <a href="qt.html#WindowState-enum">Qt::WindowState</a> and <a href="qwidget.html#setWindowState">setWindowState</a>().</p>
<h3 class="fn"><a name="windowSurface"></a>QWindowSurface * QWidget::windowSurface () const</h3>
<p><b>This function is under development and is subject to change.</b></p>
<p>Returns the QWindowSurface this widget will be drawn into.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qwidget.html#setWindowSurface">setWindowSurface</a>().</p>
<h3 class="fn"><a name="windowType"></a><a href="qt.html#WindowType-enum">Qt::WindowType</a> QWidget::windowType () const</h3>
<p>Returns the window type of this widget. This is identical to <a href="qwidget.html#windowFlags-prop">windowFlags</a>() &amp; <a href="qt.html#WindowType-enum">Qt::WindowType_Mask</a>.</p>
<p>See also <a href="qwidget.html#windowFlags-prop">windowFlags</a>.</p>
<h3 class="fn"><a name="x11Event"></a>bool QWidget::x11Event ( XEvent * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This special event handler can be reimplemented in a subclass to receive native X11 events which are passed in the <i>event</i> parameter.</p>
<p>In your reimplementation of this function, if you want to stop the event being handled by Qt, return true. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.</p>
<p><b>Warning:</b> This function is not portable.</p>
<p>See also <a href="qapplication.html#x11EventFilter">QApplication::x11EventFilter</a>().</p>
<h3 class="fn"><a name="x11Info"></a>const <a href="qx11info.html">QX11Info</a> &amp; QWidget::x11Info () const</h3>
<p>Returns information about the configuration of the X display used to display the widget.</p>
<p><b>Warning:</b> This function is only available on X11.</p>
<h3 class="fn"><a name="x11PictureHandle"></a><a href="qt.html#HANDLE-typedef">Qt::HANDLE</a> QWidget::x11PictureHandle () const</h3>
<p>Returns the X11 Picture handle of the widget for XRender support. Use of this function is not portable. This function will return 0 if XRender support is not compiled into Qt, if the XRender extension is not supported on the X11 display, or if the handle could not be created.</p>
<hr />
<h2>Related Non-Members</h2>
<h3 class="fn"><a name="QWidgetList-typedef"></a>typedef QWidgetList</h3>
<p>Synonym for <a href="qlist.html">QList</a>&lt;<a href="qwidget.html">QWidget</a> *&gt;.</p>
<h3 class="fn"><a name="WId-typedef"></a>typedef WId</h3>
<p>Platform dependent window identifier.</p>
<hr />
<h2>Macro Documentation</h2>
<h3 class="fn"><a name="QWIDGETSIZE_MAX"></a>QWIDGETSIZE_MAX</h3>
<p>Defines the maximum size for a <a href="qwidget.html">QWidget</a> object.</p>
<p>The largest allowed size for a widget is <a href="qsize.html">QSize</a>(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX), i.e&#x2e; <a href="qsize.html">QSize</a> (16777215,16777215).</p>
<p>See also <a href="qwidget.html#maximumSize-prop">QWidget::setMaximumSize</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
